PDA

View Full Version : Selecting IK end effectors in MEL.


SteveMiddleton
09-06-2009, 11:24 PM
Hi there,

Everytime I create a new IK handle in Maya via MEL, it creates an end effector named "effector1", or "effector2", depending on what is in my scene. I don't want to rely on the auto-name of the end effector, so I'm wondering if there is a way to either:

a) name the effector at the create-time of the IK handle, or

b) select the effector for a particular IK handle in MEL.

Any help would be greatly appreciated -- thanks!

mlefevre
09-08-2009, 01:27 PM
Hey,

Here's a coupla methods.

Renaming effector on creation.

string $effector[];
$effector = `ikHandle -solver ikRPsolver -startJoint joint1 -endEffector joint3`;
rename $effector[1] "myEndEffector";
Renaming effector after creation.

string $ikHandle[] = `ls -sl`;
string $effector[] = `listConnections $ikHandle[0]`;
rename $effector[1] "myEndEffector";


Check out maya's command reference for the 'ikHandle' MEL command.

Good luck!

CGTalk Moderation
09-08-2009, 01:27 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.