Posts

Showing posts from October, 2020

Maya Rigging Tips: Using jointOrient and changing shape-node's parent and hierarchical position

I had a nice discussion with my rigger friend and found out neat way of setting up rotation controllers with less offset nodes. ;p Sample code A: def sample():     import maya.cmds as mc;     # Regacy using an offset node     c01= mc.circle(n="RotateA_regacy")[0];     c02= mc.circle(n="RotateB_regacy")[0];     os01= mc.ls(mc.parent(mc.group(em=1,n="offset"),c01),sl=1,l=1)[0];     c02= mc.ls(mc.parent(c02,os01),sl=1,l=1);     mc.setAttr(os01+".rx",90);          # Tips using jointOrient and changing shape's parent     c03= mc.circle(n="RotateA")[0];     c04= mc.ls(mc.joint(n="RotateB"),sl=1,l=1)[0];     nc= mc.circle();     mc.parent(mc.listRelatives(nc,ad=0)[0],c04,s=1,r=1);     mc.reorder((mc.listRelatives(c03,ad=0)[0]),back=1);     mc.setAttr(c04+".jointOrientX",90);     mc.setAttr(c04+".drawStyle",2);     mc.dele...