show path lag Solution, in transform layer tool

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
JeroenKoffeman
Posts: 32
Joined: Tue Mar 24, 2015 3:04 pm

show path lag Solution, in transform layer tool

Post by JeroenKoffeman »

I find the showpath function of the transform layer tool super handy, however it produces significant lag when this flag is turned on.

There's a simple solution:

In lm_transform_layer.lua, change the following code:

Code: Select all

function LM_TransformLayer:DrawMe(moho, view)
	if (moho.layer == nil or moho:IsPlaying())
replace it by:

Code: Select all

function LM_TransformLayer:DrawMe(moho, view)
	if (moho.layer == nil or moho:IsPlaying() or self.dragging) then
This way, the drawpath function is temporarily disabled during a mousedrag, so there is no lag.
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: show path lag Solution, in transform layer tool

Post by synthsin75 »

Except that disables being able to see the path when directly manipulating it via ctrl-drag and doesn't draw the the frame points on the path.
JeroenKoffeman
Posts: 32
Joined: Tue Mar 24, 2015 3:04 pm

Re: show path lag Solution, in transform layer tool

Post by JeroenKoffeman »

ctrl drag still works, and the points are being updated after the mouse is released. True, you are not able to see the path while dragging, but for the increase in speed, it's worth it.
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: show path lag Solution, in transform layer tool

Post by synthsin75 »

You could add 'not mouseEvent.ctrlKey' to your conditional.
Post Reply