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)