PDA

View Full Version : getnodebyname method for melscript


robomojo
10-22-2009, 11:44 PM
Hello,
I'm looking for a command or method to get a node by its name in mel. Obviously coming from maxscript here.

Basically want to map objects to variables, so that I can easily use the same rigging script for different characters.

// example only

// mapping
$R_toe_bone = character3|skeleton|root|upperleg|lowerleg|foot|toe;
$R_toe_ctrl = character3|IK|toegroup;

// connecting
$R_toe_bone.rotateX = -$R_toe_ctrl.rotateX;

Can anyone help me out?

dbiggs
10-23-2009, 01:38 AM
Here's your example fixed up, hope that helps.

// mapping
string $R_toe_bone = "character3|skeleton|root|upperleg|lowerleg|foot|toe";
string $R_toe_ctrl = "character3|IK|toegroup";

// connecting
connectAttr -f ($R_toe_bone+".rotateX") ($R_toe_ctrl+".rotateX");

CGTalk Moderation
10-23-2009, 01:38 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.