Exemple #1
0
 def setUp(self):
     try:
         self.mi_puppet = PUPPETMETA.cgmPuppet(
             'cgmPuppetTesting_puppetNetwork')
     except:
         self.mi_puppet = cgmMeta.createMetaNode('cgmPuppet',
                                                 name='cgmPuppetTesting')
Exemple #2
0
cgm.core._reload()
from cgm.core import cgm_Meta as cgmMeta
from cgm.core import cgm_PuppetMeta as cgmPM

#puppet...
p1 = cgmPM.cgmPuppet('M1_puppetNetwork')
p1.templateSettings_call('markStarterData')
p1.templateSettings_call('query')
p1.templateSettings_call('store')
p1.templateSettings_call('reset')
p1.templateSettings_call('load')
p1.templateSettings_call('update')

p1.templateSettings_call('export')
p1.templateSettings_call('import')

p1.mirrorSetup_verify(mode='template')
"""
store -- store current pose
load -- load stored pose
query -- query the pose
update -- this mode is if the base data has been updated
markStarterData -- this mode is for testing and will mark the base point data
            
"""
m1 = cgmMeta.cgmNode('l_eye_part')
m1 = cgmMeta.cgmNode('spine_part')
m1 = cgmMeta.cgmNode('l_arm_part')
m1 = cgmMeta.cgmNode('l_index_part')
m1.templateSettings_call('query')
m1.templateSettings_call('store')
leg1 = r9Meta.MetaClass('l_leg_part')
leg2 = r9Meta.MetaClass('r_leg_part')
leg1.connectChildNode(leg2, 'moduleMirror', 'moduleMirror')

m1 = r9Meta.MetaClass('l_clav_part')
jFactory.go(m1)

#>>> Modules
#=======================================================
m1 = cgmPM.cgmEyeball(name='eye')
m1 = cgmMeta.cgmNode('l_eye_part')
m1.getState()
m1.__verify__()
m1 = r9Meta.MetaClass('spine_part')
m1 = r9Meta.MetaClass('neck_part')
a = cgmPM.cgmPuppet(name='MorphyEye')
a.connectModule(m1)
m1 = r9Meta.MetaClass('l_leg_part')
m1.setState('skeleton', force=True)
m1.setState('rig', force=True)
m1.getPartNameBase()
mFactory.isSkeletonized(m1)
mFactory.isTemplated(m1)
mFactory.doSize(m1, geo=['pSphere1'])
mFactory.isSized(m1)
mFactory.doTemplate(m1)
mFactory.isModule(m1)
a._verifyMasterControl()
a.getGeo()
m1.coreNames.value
m1.templateNull.handles
log.setLevel(logging.INFO)

obj = mc.ls(sl=True)[0] or False
obj = ''
objList = []

import cgm.core
cgm.core._reload()
#>>> Morpheus
#=======================================================
p = cgmPM.cgmMorpheusMakerNetwork('Morphy_customizationNetwork')
p.setState('skeleton',forceNew = True)
p.mNode
p.mNode
morphyF.verify_customizationData(p)['clavicle_right'][0]
cgmPM.cgmPuppet('Morphy_puppetNetwork')
k = cgmPM.cgmMorpheusMakerNetwork('Morphy_customizationNetwork')
k.mNode
str_m1 = 'spine_part'
#[2.4872662425041199, 132.08547973632812, 11.861419200897217] #
m1 = r9Meta.MetaClass(str_m1)
p.setState('skeleton')
log.info(m1.getState())
m1.getGeneratedCoreNames()
tFactory.updateTemplate(m2)
m2.setState('size')
m2.setState('skeleton',forceNew = True)
m2.setState('template',forceNew = True)
tFactory.returnModuleBaseSize(m2)
m2.rigNull.skinJoints
m2.moduleParent.rigNull.skinJoints
from cgm.lib import search
from cgm.core.rigger import ModuleFactory as mFactory
from cgm.core.rigger import PuppetFactory as pFactory
from cgm.core.rigger import TemplateFactory as tFactory
from cgm.core.rigger import JointFactory as jFactory
from cgm.lib import attributes

reload(attributes)
reload(pFactory)
reload(mFactory)
reload(tFactory)
reload(jFactory)

pFactory.stateCheck(m1.modulePuppet)

p1 = cgmPM.cgmPuppet(name='bob')
p1.connectModule(leg)
pFactory.animSetAttr(m1.modulePuppet, 'visSub', 1, True)
#>>> Morphy Puppet
#=======================================================
Morphy = cgmPM.cgmPuppet('Morphy_puppetNetwork')
Morphy.p_nameShort
Morphy.getModules()
Morphy.mirrorMe()
Morphy.puppetSet.select()

obj = mc.ls(sl=True)[0] or False
obj = ''
objList = []
mTypes = ['cgmPuppet', 'cgmMorpheusPuppet', 'cgmMorpheusMakerNetwork']
r9Meta.getMetaNodes(mAttrs='mClass', mTypes=mTypes, dataType='')
a.mNode
a.pupilHelper
a.__mirrorBuild__()
a.__mirrorPush__()
a.__verifyModule__()
a.__updateSizeData__()
p=a.__buildSimplePuppet__()
cgmPM.getSettingsColors('')
p.getModules()
a.__rebuildShapes__()
a.doName(nameChildren=True)
b = cgmPM.cgmEyeball(name = 'eye',direction = 'left')
cgmPM.cgmModule(name = 'eye',direction = 'left')

m1 = cgmPM.cgmModule('l_eye_part')

m1.doSetParentModule('neck_part')
p = cgmMeta.cgmNode('Morphy_puppetNetwork')
p.mClass
p.gatherModules()
m1 = cgmPM.cgmModule('l_eyelid_part')
m1.getNameAlias()
m1.get_allModuleChildren()
m1.isSized()
m1.doTemplate()
m1.isTemplated()
m1.doSkeletonize()
p = cgmPM.cgmPuppet(name = 'left_eye')
p._verifyMasterControl(size = 1)
p.getModules()
p.gatherModules()