Hi there,

since I am pretty new to Maya python api, I wonder how to set up the joint
rotation order.  as you know default is xyz.
In a python plug-in code,  I created joints and manipulate them. I want to
set rotation order for the joints but when I looked up the api ref, it said
rotation order should be set in MFnTransform function class not in
MFnIkJoint with method. sounds like MFnTransform class is for any dag node
needs to move and wonder how I can I use this or if my guess is right or
not? using script flag could be another way, but as purpose of learning api
to build a plug-in, I want to know about using lower level.

Any help will be much appreciate it!


Thanks a lot!

Matt,

       OMA ==> OpenMayaAnim

        jointFn = OMA.MFnIkJoint()

        for i in range(1, len(self.jointObjects)):
            jointFn.setObject(self.jointObjects[i])

            *OpenMaya.MFnTransform.setRotationOrder(self, order, reorder)
 <===?*
            rotationAngle = OM.MAngle(self.jointOrientation,
OM.MAngle.kDegrees)

jointFn.setOrientation(OM.MEulerRotation(rotationAngle.asRadians(), 0, 0,
self.rotOrder))
            translationVector = OM.MVector(0, self.jointDistance, 0)
            jointFn.setTranslation(translationVector, OM.MSpace.kTransform)

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAMczULY5WmrNZx_q1kwzi5%3Dyni8VubjtPJHTxaaz-0ooD-1L-g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to