本文整理汇总了Python中Red9.core.Red9_Meta.registerMClassNodeMapping方法的典型用法代码示例。如果您正苦于以下问题:Python Red9_Meta.registerMClassNodeMapping方法的具体用法?Python Red9_Meta.registerMClassNodeMapping怎么用?Python Red9_Meta.registerMClassNodeMapping使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Red9.core.Red9_Meta
的用法示例。
在下文中一共展示了Red9_Meta.registerMClassNodeMapping方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _reload
# 需要导入模块: from Red9.core import Red9_Meta [as 别名]
# 或者: from Red9.core.Red9_Meta import registerMClassNodeMapping [as 别名]
def _reload():
'''
reload carefully and re-register the RED9_META_REGISTRY
'''
Red9.core._reload()
reload(cgm_General)
reload(cgm_Meta)
reload(cgm_PuppetMeta)
reload(cgm_RigMeta)
reload(cgmPy.validateArgs)
reload(rigger.ModuleFactory)
reload(rigger.JointFactory)
reload(rigger.TemplateFactory)
reload(rigger.PuppetFactory)
reload(rigger.RigFactory)
reload(rigger.ModuleShapeCaster)
reload(rigger.ModuleControlFactory)
reload(classes.DraggerContextFactory)
reload(classes.SnapFactory)
reload(lib.rayCaster)
reload(lib.meta_Utils)
reload(lib.shapeCaster)
Red9_Meta.registerMClassNodeMapping(nodeTypes = ['transform','objectSet','clamp','setRange','pointOnCurveInfo','decomposeMatrix','remapValue',
'ikSplineSolver','blendColors','blendTwoAttr','addDoubleLinear','condition','multiplyDivide','plusMinusAverage'])
print('CGM Core Reloaded and META REGISTRY updated')
print '=============================================================================='
Red9_Meta.printSubClassRegistry()
print '=============================================================================='
示例2: test_registerMClassNodeMapping
# 需要导入模块: from Red9.core import Red9_Meta [as 别名]
# 或者: from Red9.core.Red9_Meta import registerMClassNodeMapping [as 别名]
def test_registerMClassNodeMapping(self):
'''
test the registry functions for nodeTypes
'''
cmds.file(new=True,f=True)
r9Meta.MetaClass(name='standardNetworkMetaNode')
assert [cmds.nodeType(n.mNode) for n in r9Meta.getMetaNodes()]==['network']
#register transforms to the NodeTypes
r9Meta.registerMClassNodeMapping(nodeTypes='transform')
assert r9Meta.getMClassNodeTypes()==['network', 'transform']
new=r9Meta.MetaClass(name='newTransformMetaNode', nodeType='transform')
assert [cmds.nodeType(n.mNode) for n in r9Meta.getMetaNodes()]==['network','transform']
#reset the NodeTypes
r9Meta.resetMClassNodeTypes()
assert r9Meta.getMClassNodeTypes()==['network']
assert [cmds.nodeType(n.mNode) for n in r9Meta.getMetaNodes()]==['network']
示例3: MyCameraMeta
# 需要导入模块: from Red9.core import Red9_Meta [as 别名]
# 或者: from Red9.core.Red9_Meta import registerMClassNodeMapping [as 别名]
class MyCameraMeta(r9Meta.MetaClass):
'''
Example showing that metaData isn't limited to 'network' nodes,
by using the 'nodeType' arg in the class __init__ you can modify
the general behaviour such that meta creates any type of Maya node.
'''
def __init__(self,*args,**kws):
super(MyCameraMeta, self).__init__(nodeType='camera',*args,**kws)
#========================================================================
# This HAS to be at the END of this module so that the RED9_META_REGISTRY
# picks up all inherited subclasses contained within.
# When this module is imported all subclasses will be added to the registry.
# I have to do this as outside of a controlled production environment
# I can't guarantee the Maya / Python boot sequence.
#========================================================================
r9Meta.registerMClassInheritanceMapping()
#========================================================================
# This block is ONLY needed if you want to register other nodeTypes
# to the metaData systems as in the camera example above. Note that
# ANY node can be used in Meta, this registry is ONLY needed if you
# want a specific nodeType to be generated for full metaData handling
#========================================================================
r9Meta.registerMClassNodeMapping(nodeTypes='camera')