Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #zeroes selected attrs in channelbox
- import maya.cmds as mc
- import maya.mel as mel
- vSel = mc.ls(sl=True)
- for i in vSel:
- gChannelBoxName = mel.eval('$temp=$gChannelBoxName')
- vAttrs = mc.channelBox (gChannelBoxName, q=True, sma = True)
- if not vAttrs:
- vAttrs = cmds.listAttr(i, s=True, w=True, k=True, u=True)
- for j in vAttrs:
- vDefault = cmds.attributeQuery(j, node=i, listDefault=True)[0]
- cmds.setAttr(i+'.'+j,vDefault)
- else:
- for j in vAttrs:
- vDefault = mc.attributeQuery(j, node=i, listDefault=True)[0]
- mc.setAttr(i+'.'+j,vDefault)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement