connectAttr()

Posted by:

Autodesk documentation on this is not great.  They don’t do a good job of telling you how this works, it just shows you some examples that you are apparently supposed to run and then reverse engineer the function by it’s results.

Anyway, there is a source attribute, that is the first argument, then there is the target attribute, that is the second attribute.

This takes the 1st selected attribute of an object and connects it to the second object’s attribute:

 

Continue Reading →
0

setAttr()

Posted by:

setAttr() in Maya expects an argument that connects two object’s attributes together.

Note that Maya is very particular about how this should be structured.  It likes to have the attribute broke out from the object variable with the “+”:

cmds.setAttr(objectAttrOut + ‘attrOut’, objectAttrIn + ‘attrIn’)

 

Continue Reading →
0

Text Fields in Maya Explained (Python)

Posted by:

Text fields are confusing.  It’s easy to display one, but how do you get information from one?  How do you update them?  Maybe you should look to the Autodesk website for detailed information… HaHaHahahaaaa.  Sorry, that one always gets me.

This is the code that goes in the GUI layout:

cmds.textField()
Simple.
So to see that in action in a GUI copy this code:

Great, that is a text field.  But how do you use it?  Well let’s say you want to read the entry ...

Continue Reading →
0