Curve Pt location

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

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

Post Reply
dkwroot
Posts: 659
Joined: Thu May 02, 2013 6:56 am
Location: USA
Contact:

Curve Pt location

Post by dkwroot » Mon Nov 02, 2015 10:35 pm

I'm hoping someone can help me out with this function. I noticed that it's possible to get the curve and value indicating where on the curve a point lies by using the following function:

Code: Select all

local ptLoc = -1
local curve,ptID = pt:Curve(1,ptLoc)
This function gives me a curve, but it fails to return the location of the point on the curve. When I print out ptLoc the program just gives me whatever number I initially assigned it. Has anyone had any luck with this function? Is it broken or did I mess something up?

function info: http://aslua.com/index.php?show=method& ... rve&id=775
dkwroot
Posts: 659
Joined: Thu May 02, 2013 6:56 am
Location: USA
Contact:

Re: Curve Pt location

Post by dkwroot » Mon Nov 02, 2015 10:45 pm

Nevermind, I figured it out. The program is very picky about defining local variables. I have to define the curve as nil and the point location variable separately and then call the point:Curve(curve,ptPos) function.
Post Reply