View Full Version : how to access ArcLength?

02 February 2008, 03:58 PM
i have a curve named "aCurve";
and i added the arc length command to it (arclen -ch 1);
how can i print the output in mel in order to be able to use it within a script?

02 February 2008, 05:31 PM
more specificly im trying to create a simple float like this.
float $aFloat = curveInfo1.arcLength;

02 February 2008, 06:43 AM
The return value of the arclen command is the name of the arclen node, so you should first store that name in a variable and then you can use a getAttr command to store the arcLen within your float variable like so...

string $arcLen = `arclen -ch true`;
float $length = `getAttr ($arcLen + ".arcLength")`;

02 February 2008, 01:02 PM
cool. im not very educated in the whole node thing., but im working on it:)

CGTalk Moderation
02 February 2008, 01:02 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.