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:


set_radius(value) 
Change the joint radius
Arguments:
  • value {float or int} -- The new radius of the joint


add_joint_orient(rotate_x=True, rotate_y=True, rotate_z=True)
Transfer the values of the joint orient XYZ attributes to the joint rotation XYZ attributes.
Keyword Arguments:
  • 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})


zero_joint_orient()
Zero the values of the joint orient attributes.


_____________________________________________

Get Arise at: https://www.ariserigging.com