PDA

View Full Version : how to access ArcLength?


MegaManZZ
02-25-2008, 02: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?

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

NPuetz
02-26-2008, 05: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")`;

MegaManZZ
02-26-2008, 12:02 PM
cool. im not very educated in the whole node thing., but im working on it:)

CGTalk Moderation
02-26-2008, 12: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.