I have started working on the next iteration of my rigging tools and I wanted to try taking things up a notch. To that end I started some work on a custom locator that will be used as a layout object in the setup face of the rig. In this video I briefly show the locator and provide a peek at the menu that will hold the rigging tool set.
I am going to stat posting some code around here. If you don’t know, I mostly work in Autodesk Maya and I like to write my scripts in Python or PyMel. I am always writing a little snippet of code to handle mundane tasks, so I thought I would start posting those snippets for all to enjoy. I will of course be posting more advanced stuff at some point, but I figure I need to start this nerd party somewhere. One thing I tend to do a lot in my rigging is create and place some object and the position of my joints. In this case it’s locators. If you are totally new to Python in Maya, you will need to know these beginer tips.
1st Make sure you post this code in a Python script window.
2nd Make sure you import the Python commands library into your session with this. import maya.cmds as cmds
3rd Enjoy doing stuff faster.
joints = cmds.ls(sl=True) for joint in joints: lctrName = joint.replace('gjnt', 'lctr_ctrl') jntPos = cmds.xform(joint, q=True, t=True, ws=True) lctr = cmds.spaceLocator(n=lctrName, p=jntPos)