Skip to main content

Posts

Showing posts from December, 2012

Feed me a cat

The past few days I've been rigging this character. Thankfully, I think I only have to do this one rig, then all of the characters in the game I'm helping make will be able to share this rig and share it's animations, thus saving me a metric shitload of time.  If this rig looks familiar to you, then you probably work at Valve. I "borrowed" their rig to use on this character and studied it's innermost secrets. Appearances can be deceiving though, the only thing I truly "stole" were the fairly generic control curves, which are pretty simple to create. The real meat of this rig I still had to do myself.  I had to resize and reposition all of the curves, redo all the constraints and the set driven keys, and was inspired to write a "ZeroGroup" script by looking at the way all of Valve's control curves were parented under groups to reset their transformation values, something I didn't know about before. I learned tons more by cop

Maya Script Thingy

I like blogs. Today I made this script in Python that takes a bunch of things (for me specifically, it was control curves for a rig I'm making), and groups them, transferring their transformations (heh) on to the group, thereby zeroing out the transformations on the curves themselves. This is especially handy when you're positioning your curves in relation to your character, and you want to zero out their rotations while keeping the local rotation axis. You can't just use Freeze Transformation because it resets the object space rotation axis, which you kind of need to animate easily. It doesn't seem to work 100% perfectly, but it's good enough for me.  Anyway, here it is for anyone to use # Zeros out controls by grouping them, the group takes the transformations import maya.cmds as cmds selection = cmds.ls(sl=True) rotation = [] trans = [] for object in selection:     rotation = cmds.xform(object, q=True, ws=True, ro=True)     trans = cmds.xform(object