PDA

View Full Version : Naming new deformer node


EightBit
07-31-2009, 06:22 PM
Why isn't -n "name" causing a new deformer node to be named at creation? IE:

select -r cube ;
nonLinear -type bend -curvature 0.5 -n "junkBend";
// bend1 bend1Handle //

Thanks.

Leffler
08-03-2009, 04:08 PM
Why isn't -n "name" causing a new deformer node to be named at creation? IE:

select -r cube ;
nonLinear -type bend -curvature 0.5 -n "junkBend";
// bend1 bend1Handle //

Thanks.

This should do it:

$bendHandle = `nonLinear -type bend -curvature 0.5`;
rename ($bendHandle[1])("junkBend");

If you look in the MEL command reference, you see that "nonLinear" returns an array, where [1] is the name of the transform node

The MEL command reference is aweeeesome

// Otto

EightBit
08-04-2009, 05:45 PM
Thanks, I did look it up in the reference, but failed to notice that it returns an array. I wonder what the -n option is for?

To be thorough, here is the code to rename all 4 nodes created for the nonLinear deformer:
select -r Boxy;
$bendHandle = `nonLinear -type bend -curvature 0.5`;
rename ($bendHandle[0])("BoxyBend"); // Renames the nonLinear node
rename ($bendHandle[1])("BoxyBendHandle"); // Renames the nonLinear Handle and the Shape nodes
rename ($bendHandle[0]+"Set")("BoxyBendSet"); // Renames the object set for the deformer

Thanks again.

CGTalk Moderation
08-04-2009, 05:45 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.