Esempio n. 1
0
		mc.orientConstraint(mi_controlIK.mNode,mi_ikEnd.mNode, maintainOffset = True)
	
	    except Exception,error:
		raise Exception,"%s.build_FKIK>>> IK No Flip error: %s"%(self._go._strShortName,error)
	    
	    #=============================================================    
	    try:#>>>Connect Blend Chains and connections
		#>>> Main blend
		mPlug_FKIK = cgmMeta.cgmAttr(mi_settings.mNode,'blend_FKIK',lock=False,keyable=True)
		
		if self.ml_fkAttachJoints:
		    ml_fkUse = self.ml_fkAttachJoints
		    for i,mJoint in enumerate(self.ml_fkAttachJoints):
			mc.pointConstraint(ml_fkJoints[i].mNode,mJoint.mNode,maintainOffset = False)
			#Connect inversed aim and up
			NodeF.connectNegativeAttrs(ml_fkJoints[i].mNode, mJoint.mNode,
		                                   ["r%s"%self._go._jointOrientation[0],"r%s"%self._go._jointOrientation[1]]).go()
			cgmMeta.cgmAttr(ml_fkJoints[i].mNode,"r%s"%self._go._jointOrientation[2]).doConnectOut("%s.r%s"%(mJoint.mNode,self._go._jointOrientation[2]))
		   
		    self.ml_fkAttachJoints[0].parent = ml_controlsFK[0].parent#match parent		    
		    if self._go._partType == 'finger':self.ml_fkAttachJoints[1].parent = ml_controlsFK[1].parent#match parent	
		
		else:
		    ml_fkUse = ml_fkJoints
		    
		rUtils.connectBlendChainByConstraint(ml_fkUse,ml_ikJoints,ml_blendJoints,
	                                             driver = mPlug_FKIK.p_combinedName,l_constraints=['point','orient'])
	
		
		
		
		#>>> Settings - constrain