Пример #1
0
    def write(self, nodes, **kwargs):
        so = dict(nodes=nodes)
        so['clip'] = self.CLIP_CLS.Generate(nodes, **kwargs)

        #write the preset file to disk
        with open(self.path(), 'w') as f:
            cPickle.dump(so, f)

        #generate the icon for the clip and add it to perforce if appropriate
        icon = generateIcon(self)

        printInfoStr("Generated clip!")
Пример #2
0
	def write( self, nodes, **kwargs ):
		so = dict( nodes=nodes )
		so['clip'] = self.CLIP_CLS.Generate( nodes, **kwargs )

		#write the preset file to disk
		with open( self.path(), 'w' ) as f:
			cPickle.dump( so, f )

		#generate the icon for the clip and add it to perforce if appropriate
		icon = generateIcon( self )

		printInfoStr( "Generated clip!" )
Пример #3
0
def cleanMeshControls( doConfirm=True ):
	shapesRemoved = 0
	for node in getRigPartContainers( True ):

		clsName = getAttr( '%s._rigPrimitive.typeName' % node )
		cls = RigPart.GetNamedSubclass( clsName )

		if cls is None:
			continue

		rigPart = cls( node )
		for c in rigPart:
			for shape in listRelatives( c, s=True, pa=True ) or []:
				if getAttr( '%s.intermediateObject' % shape ):
					delete( shape )
					shapesRemoved += 1

	printInfoStr( "Clean up %d bogus shapes" % shapesRemoved )
	if doConfirm:
		cmd.confirmDialog( t='Done!', m="I'm done polishing your rig!\n%d shapes removed." % shapesRemoved, b='OK', db='OK' )