Exemplo n.º 1
0
def get_deformers(self,deformerTypes = 'all'):
    """
    
    """	
    try:_str_funcName = "{0}.get_deformers()".format(self.p_nameShort)
    except:_str_funcName = "get_deformers()"
    
    try:
	return deformers.returnObjectDeformers(self.mNode,deformerTypes)
    except StandardError,error:
	log.error("Self: {0}".format(self))
	log.error("deformerTypes: {0}".format(deformerTypes))	
	raise StandardError, "{0} fail | error: {1}"(_str_funcName,error)
Exemplo n.º 2
0
m2.moduleParent.rigNull.skinJoints
m2.templateNull.controlObjects
m2 = r9Meta.MetaClass('l_hand_part')

l_joints = [
    u'|pelvis_surfaceJoint', u'|pelvis_surfaceJoint|spine_1_surfaceJoint',
    u'|pelvis_surfaceJoint|spine_1_surfaceJoint|spine_1_1_surfaceJoint',
    u'|pelvis_surfaceJoint|spine_1_surfaceJoint|spine_1_1_surfaceJoint|spine_1_2_surfaceJoint',
    u'|pelvis_surfaceJoint|spine_1_surfaceJoint|spine_1_1_surfaceJoint|spine_1_2_surfaceJoint|spine_2_surfaceJoint',
    u'|pelvis_surfaceJoint|spine_1_surfaceJoint|spine_1_1_surfaceJoint|spine_1_2_surfaceJoint|spine_2_surfaceJoint|spine_2_1_surfaceJoint',
    u'|pelvis_surfaceJoint|spine_1_surfaceJoint|spine_1_1_surfaceJoint|spine_1_2_surfaceJoint|spine_2_surfaceJoint|spine_2_1_surfaceJoint|spine_2_2_surfaceJoint',
    u'|pelvis_surfaceJoint|spine_1_surfaceJoint|spine_1_1_surfaceJoint|spine_1_2_surfaceJoint|spine_2_surfaceJoint|spine_2_1_surfaceJoint|spine_2_2_surfaceJoint|sternum_surfaceJoint'
]
surfaceBuffer = u'test_distanceBuffer'

Rig.addSquashAndStretchToControlSurfaceSetup(surfaceBuffer, l_joints)

from cgm.lib import skinning, distance, logic
cluster = 'spine_controlSurface'
reload(skinning)
reload(distance)
reload(logic)
skinning.simpleControlSurfaceSmoothWeights(cluster)
ns = cgmMeta.cgmNode('spine_controlSurface')
ns.getComponents('cv')[-1]

from cgm.lib import deformers
deformers.returnObjectDeformers(obj, deformerTypes='skinCluster')

reload(Rig)
Rig.controlSurfaceSmoothWeights('spine_controlSurface')
#252ms
m1.isSkeletonized()
mControlFactory.go(obj)
m1.setState('skeleton')
tFactory.returnModuleBaseSize(m2)
m2.rigNull.skinJoints
m2.moduleParent.rigNull.skinJoints
m2.templateNull.controlObjects
m2 = r9Meta.MetaClass('l_hand_part')



l_joints = [u'|pelvis_surfaceJoint', u'|pelvis_surfaceJoint|spine_1_surfaceJoint', u'|pelvis_surfaceJoint|spine_1_surfaceJoint|spine_1_1_surfaceJoint', u'|pelvis_surfaceJoint|spine_1_surfaceJoint|spine_1_1_surfaceJoint|spine_1_2_surfaceJoint', u'|pelvis_surfaceJoint|spine_1_surfaceJoint|spine_1_1_surfaceJoint|spine_1_2_surfaceJoint|spine_2_surfaceJoint', u'|pelvis_surfaceJoint|spine_1_surfaceJoint|spine_1_1_surfaceJoint|spine_1_2_surfaceJoint|spine_2_surfaceJoint|spine_2_1_surfaceJoint', u'|pelvis_surfaceJoint|spine_1_surfaceJoint|spine_1_1_surfaceJoint|spine_1_2_surfaceJoint|spine_2_surfaceJoint|spine_2_1_surfaceJoint|spine_2_2_surfaceJoint', u'|pelvis_surfaceJoint|spine_1_surfaceJoint|spine_1_1_surfaceJoint|spine_1_2_surfaceJoint|spine_2_surfaceJoint|spine_2_1_surfaceJoint|spine_2_2_surfaceJoint|sternum_surfaceJoint']
surfaceBuffer= u'test_distanceBuffer'

Rig.addSquashAndStretchToControlSurfaceSetup(surfaceBuffer,l_joints)

from cgm.lib import skinning,distance,logic
cluster = 'spine_controlSurface'
reload(skinning)
reload(distance)
reload(logic)
skinning.simpleControlSurfaceSmoothWeights(cluster)
ns = cgmMeta.cgmNode('spine_controlSurface')
ns.getComponents('cv')[-1]

from cgm.lib import deformers
deformers.returnObjectDeformers(obj,deformerTypes = 'skinCluster')

reload(Rig)
Rig.controlSurfaceSmoothWeights('spine_controlSurface')
Exemplo n.º 4
0
	def __func__(self):
	    """
	    """
	    return deformers.returnObjectDeformers(self._mi_transform.mNode,self.d_kws['deformerTypes'])