Posts Tagged 'Code'

The Maya Move Command

Posted by:

As per usual Autodesk documentation on this is abysmal.  The following explanation of the absolute flag is taken directly from the Autodesk website:

absolute(a)
Perform an absolute operation

Are you kidding me Autodesk?  That’s bush league man!  You couldn’t get away with that in 3rd grade.  You get an F!

So I did extensive research and experimentation with the move command and as I did so I wrote out my notes, and here they are, you are welcome.

First of all, translating an object uses ...

Continue Reading →
0

Get the locations of points on a curve, pointPosition(), Maya, Python

Posted by:

So Autodesk documentation on this is sparse and a bit inaccurate.

In order to get this function to work you need to separate out the parameters at the ‘.’ (something I am finding is a common thread among many of maya’s library functions)

This is the way to do it:

 

Note that this won’t work:

pointA = cmds.pointPosition(str(selectedCurve.cv[1]), world = True)

Because the .cv[1] is not separated out.

This however will work:

pointA = cmds.pointPosition(str(selectedCurve) + ‘.cv[0]’, world = True)#this is just another way of converting a ...

Continue Reading →
0

Create Null Above Object, Constrain Null To Secondary Object, Control Constraint With Attribute on Original Object, Maya, Python Script

Posted by:

I frequently have to have an object follow another object but that original object still has to be able to be controlled in the “local space” of the parent object, but then sometimes be independent of the parent object.  Think an IK hand control.

Anyway, I have to do this so often that I thought I would write a script so I never have to do it again.

Continue Reading →
0