Tuesday, May 17, 2011

Make Time last!


Monday, May 2, 2011

More Handy Scripts

I was going through testing some skin weighting and found myself wanting to zero out my ctrls easily. Came up with little script that would zero out all the keyable world attributes. I was using undo to revert my movement but i was running in to the issue of going back a bit too far or painting myself in a corner.


import maya.cmds as mc
import maya.mel as mm
selectionArr = mc.ls(selection = True)
for objName in selectionArr:
if len(objName) > 1:
for attr in ['t', 'r','s']:
for axis in ['x','y','z']:
if mc.getAttr((str(objName)+ '.' + attr + axis), keyable=True):
mc.setAttr(str(objName)+'.' + attr + axis, 0)