Back to 'Basics On How To Create Your Own Node'
Arise creates the Maya joints we declared in the joints_creation() method, during the 'Build' process.
You can access those joints in the rig_creation() method by calling on your class variables: self.my_joint.pointer
Which will return an object called IoJoint.
The IoJoint object can be used in 2 ways:
One way is to simply use it with the Maya cmds library which usually takes the string names of Maya elements as its first flag.
For example: cmds.xform(self.my_joint.pointer, q=True, matrix=True)
This works because the IoJoint __repr__ method had been reimplemented to return the joint long name.
The other way is to use the IoJoint built-in methods described in this document.
A major benefit of using IoJoint is that internally IoJoint tracks the joint using its UUID, which avoids a lot of problems compared to simply storing the joint string name.
As IoJoint is a subclass of IoTransform, it has all the methods available in IoTransform.
IoJoint methods:
- value {float or int} -- The new radius of the joint
add_joint_orient(rotate_x=True, rotate_y=True, rotate_z=True)
- rotate_x {bool} -- True to transfer jointOrientX to rotateX (default: {True})
- rotate_y {bool} -- True to transfer jointOrientY to rotateY (default: {True})
- rotate_z {bool} -- True to transfer jointOrientZ to rotateZ (default: {True})
_____________________________________________
Get Arise at: https://www.ariserigging.com