1
\$\begingroup\$

I need to obtain the motion path attached to a curve in maya using Python. This is the situation as shown in the editor:

Description of situation

I want to obtain motionPath1 by calling a method on curve3 since they look like they are related.

However, I have tried pleny of list methods (listAttr, listHierarchy, etc) but they only return the curveShape3.

What is the command, if it exists at all, to get the name of the motion path in Python knowing the object curve3?

\$\endgroup\$
1
\$\begingroup\$

enter image description here

You need to get motion path node name from curve shape.

import maya.cmds as cmd
shape = cmd.listRelatives( 'curve3' )
mPath = cmd.listConnections( shape, type = 'motionPath')
print mPath
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.