PDA

View Full Version : Getting an error when trying to create an ep curve using the positions of two joints


Coyote12
01-14-2013, 10:29 PM
Hi,

I am having trouble finding the correct MEL syntax to create a curve based on the position of two joints. I keep getting error parsing argument when telling it to make the curve.
my code is as follows


//getting the point locations
vector $startPoints[] = `xform -q -t -ws LT_Shoulder_Bind_Jnt`;
vector $endPoints[] = `xform -q -t -ws LT_Elbow_Bind_Jnt`;

//printing to confirm the variable
print $startPoints;
print $endPoints;


//one point curve command with the vectors inserted to be the curve points.

curve -d 1 -p $startPoints -p $endPoints -k 0 -k 1 ;

Why is this giving me the // Error: line 1: Error while parsing arguments. // ?

gmask
01-14-2013, 10:31 PM
Why is this giving me the // Error: line 1: Error while parsing arguments. // ?

many mel commands don't really take vectors as parameters directly..

try this instead..


curve -d 1 -p ($startPoints.x) ($startPoints.y) ($startPoints.z) -p ($endPoints.x) ($endPoints.y) ($endPoints.z) -k 0 -k 1 ;

Coyote12
01-15-2013, 06:33 AM
Thanks gmask!


I ended up doing that only using a float and it worked. Thanks for the help it really helped move me along today.

CGTalk Moderation
01-15-2013, 06:33 AM
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.