PDA

View Full Version : Basic MEL questions


ikaris
03-16-2004, 06:46 PM
Hello everyone, I have a few simple questions:

1) When I use "objectType" on a polyMesh, such as a cube, it returns "Mesh", yet all nurbs objects have the prefix "nurbs" like "nurbsCurve" or "nurbsSurface". For consistancy's sake, shouldn't it return "Poly" or "polyMesh" ?


2) If I have two objects, one Locator and one object with, say, a deformer on it, and I want to set the Locator's Y axis to control an attribute in the deformer, what would be the correct MEL script ?


connectAttr locator1.ty ?????;


...where the ???? should be the object.node.attribute but I know I can't do that...

Isn't the proper way to attribute the node to a $variable then attach the $variable, like:


float $fVariable object.node;
connectAttr locator1.ty $variable.deformerAttribute;


EDIT:

I can use getAttr and setAttr to get and set the values of a deformer node, i.e. "bend1.curvature" and I see that if I instance an object and duplicate it's node, changing one changes the other... and if I rename one, it forces me to use a different name... so I think I'm all good here...?

so I would use:


connectAttr locator1.ty deformerName.deformerAttribute;


Right ?

Thanks !

CGTalk Moderation
01-17-2006, 05:00 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.