Ejemplo n.º 1
0
class SplineIkFkRig( BaseRig ) :
	PARTNAME = 'splineRig'

	def __init__( self ) :
		super( SplineIkFkRig, self ).__init__()
		self.splineikrig = SplineIkRig()
		self.add_child( self.splineikrig )
	 	self.fkrig = FkRig()
	 	self.add_child( self.fkrig )

	def create( self, _jointchain=None ) :
		# print self.tree_root()
		self.splineikrig.create( _jointchain )
		self.fkrig.create( _jointchain )

		# now we'll connect the two rigs
		# first hide the start and end controls of teh fkrig
		self.fkrig.tree_children( 'rigControl' )[0].zero_group().hide()
		self.fkrig.tree_children( 'rigControl' )[-1].zero_group().hide()

		# now we can parent the upper spline control to the last fk rigjoint
		pm.parentConstraint(
			[ self.fkrig.tree_children( 'jointchain' )[0].rigjoints[-1],
			self.splineikrig.tree_children( 'rigControl' )[-1].zero_group() ],
			mo=True
		)
Ejemplo n.º 2
0
	def __init__( self ) :
		super( SplineIkFkRig, self ).__init__()
		self.splineikrig = SplineIkRig()
		self.add_child( self.splineikrig )
	 	self.fkrig = FkRig()
	 	self.add_child( self.fkrig )