poplashows.blogg.se

Maya python setattr joint.jointorientx
Maya python setattr joint.jointorientx




maya python setattr joint.jointorientx

That frustrated me, so I decided to write a quick script that does it for you. # This is just to see the difference between the two transformation matrices. When you go to orient a group of joints, it never correctly orients the end joint in the chain. # Wait 1 second and set it back to the inital transformation matrix from the joint function # If the two MTransformationMatrices are equal. TMatrix = OpenMaya.MTransformationMatrix(matrix)

maya python setattr joint.jointorientx

T_MTMatrix = OpenMaya.MTransformationMatrix() IS_MTMatrix = OpenMaya.MTransformationMatrix() ParentFn = OpenMaya.MFnTransform(parentMObj) If not parentMObj.apiTypeStr() = "kWorld": JO_MTMatrix = OpenMaya.MTransformationMatrix() R_MTMatrix = OpenMaya.MTransformationMatrix() RO_MTMatrix = OpenMaya.MTransformationMatrix() StartJointFn.getScaleOrientation(RO_Quat) Creates a script dropdown menu that will show and run all your python scripts as long as the name of the file correxspondes to a def that has the same name This file should be named: userSetup.py and put in your maya’s scripts folder. S_MTMatrix = OpenMaya.MTransformationMatrix() StartJointFn = OpenMayaAnim.MFnIkJoint(dagPath) Does anyone know where the MTransformationMatrix is storing joint orientation? It seems to be a mystery to me as it isn't in MTransformationMatrix ::rotationOrientation or MTransformationMatrix::rotation. If I get the MTransformationMatrix directly from the MFnIkJoint function it somehow seems to store the joint orientation. You may check out the related API usage on the. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

maya python setattr joint.jointorientx

These examples are extracted from open source projects.

Maya python setattr joint.jointorientx how to#

The problem is that the constructed matrix I created does not seem to respect joint orientation. The following are 30 code examples for showing how to use (). However, the last joint in the chain isn’t auto-oriented: A joint’s auto-orientation is based on the. So I've followed that and written the code below. I have this pet peeve: Whenever I create joint hierarchies in Maya, it will automatically setup the joint orientation value for you (based on option set in the ‘Joint Tool’ tool settings). : rotateOrient (attribute name is rotateAxis).(where '*' denotes matrix multiplication). The transformation matrix for a joint node is below. According to the docs the construction works as such: I'm trying to reconstruct a MTransformationMatrix from maya's MFnIkJoint in maya 2015.






Maya python setattr joint.jointorientx