Created
August 26, 2017 08:59
-
-
Save liorbenhorin/e65cf5222f36cbecfc424d6130662d86 to your computer and use it in GitHub Desktop.
Update mgear guides from older version (2.0.5) to latest (2.2.1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
import mgear.maya.attribute as att | |
import mgear.maya.shifter as sh | |
print '==== updating guides to RB2.2 ===' | |
guide = sh.RigGuide() | |
guides_root = pm.PyNode('biped_guide') | |
classicChannelNames_param = att.ParamDef2("classicChannelNames", "bool", True) | |
proxyChannels_param = att.ParamDef2("proxyChannels", "bool", False) | |
classicChannelNames_param.create(guides_root) | |
proxyChannels_param.create(guides_root) | |
print 'Added param {} to {}'.format('classicChannelNames', guides_root) | |
print 'Added param {} to {}'.format('proxyChannels', guides_root) | |
guide.findComponentRecursive(guides_root) | |
for comp, node in guide.components.iteritems(): | |
param = att.ParamDef2("ctlGrp", "string", "") | |
node_root = pm.PyNode(node.root) | |
param.create(node_root) | |
print 'Added param {} to {}'.format('ctlGrp', node) | |
print '==== done updating ===' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment