示例#1
0
	def run_create_crack_distance( self, *args ):
		objects = cmds.ls( sl = True )
		objects = oopmaya.get_object_type( objects, 'mesh' )
		
		simulation_tool.Simulation_Tool().create_crack_distance( objects )
		
		oopmaya.message( 'Added crack distance!' )
示例#2
0
    def run_create_crack_distance(self, *args):
        objects = cmds.ls(sl=True)
        objects = oopmaya.get_object_type(objects, 'mesh')

        simulation_tool.Simulation_Tool().create_crack_distance(objects)

        oopmaya.message('Added crack distance!')
示例#3
0
	def run_bake_sim( self, *args ):
		objects = cmds.ls( sl = True )
		objects = oopmaya.get_object_type( objects, 'mesh' )
		
		simulation_tool.Simulation_Tool().bake_sim( objects, bake_attr = ['translate'] )
		
		oopmaya.message( 'Finished baking simulation!' )
示例#4
0
    def run_bake_sim(self, *args):
        objects = cmds.ls(sl=True)
        objects = oopmaya.get_object_type(objects, 'mesh')

        simulation_tool.Simulation_Tool().bake_sim(objects,
                                                   bake_attr=['translate'])

        oopmaya.message('Finished baking simulation!')
示例#5
0
	def run_add_rigid_body( self, *args ):
		mag_value = cmds.floatField( self.magnitude_float, value = True, q = True )

		objects = cmds.ls( sl = True )
		objects = oopmaya.get_object_type( objects, 'mesh' )
		
		simulation_tool.Simulation_Tool().add_rigid_body( objects, magnitude = mag_value )
		
		oopmaya.message( 'Added rigid body!' )
示例#6
0
    def run_add_rigid_body(self, *args):
        mag_value = cmds.floatField(self.magnitude_float, value=True, q=True)

        objects = cmds.ls(sl=True)
        objects = oopmaya.get_object_type(objects, 'mesh')

        simulation_tool.Simulation_Tool().add_rigid_body(objects,
                                                         magnitude=mag_value)

        oopmaya.message('Added rigid body!')
示例#7
0
	def run_crack_obj( self, *args ):
		crack_value = cmds.floatField( self.crack_float, value = True, q = True )

		selected = cmds.ls( sl = True )

		if len( selected ) == 1:
			dag_node = oopmaya.DAG_Node()
			crack_tool.Crack_Tool().crack_obj( dag_node, crack_value )
			
			oopmaya.message( 'Finished cracking mesh!' )

		elif len( selected ) == 0:
			oopmaya.error( 'There are no objects selected!' )

		elif len( selected ) >= 1:
			oopmaya.error( 'There are to many objects selected!' )
示例#8
0
    def run_crack_obj(self, *args):
        crack_value = cmds.floatField(self.crack_float, value=True, q=True)

        selected = cmds.ls(sl=True)

        if len(selected) == 1:
            dag_node = oopmaya.DAG_Node()
            crack_tool.Crack_Tool().crack_obj(dag_node, crack_value)

            oopmaya.message('Finished cracking mesh!')

        elif len(selected) == 0:
            oopmaya.error('There are no objects selected!')

        elif len(selected) >= 1:
            oopmaya.error('There are to many objects selected!')
示例#9
0
    def run_build_crack_distance(self, *args):
        dis_locator = cmds.ls(sl=True)[0]

        simulation_tool.Simulation_Tool().build_crack_distance(dis_locator)

        oopmaya.message('Build crack distance!')
示例#10
0
    def run_create_cluster(self, *args):
        mesh = cmds.ls(sl=True, objectsOnly=True)[0]

        crack_tool.Crack_Tool().create_cluster(mesh)

        oopmaya.message('Created cluster!')
示例#11
0
    def run_attach_plane_rig(self, *args):
        objects = cmds.ls(sl=True)
        crack_tool.Crack_Tool().attach_plane_rig(objects)

        oopmaya.message('Attached plane rig!')
示例#12
0
    def run_create_plane_rig(self, *args):
        crack_tool.Crack_Tool().create_plane_rig()

        oopmaya.message('Created plane rig!')
示例#13
0
	def run_attach_plane_rig( self, *args ):
		objects = cmds.ls( sl = True )
		crack_tool.Crack_Tool().attach_plane_rig( objects )
		
		oopmaya.message( 'Attached plane rig!' )
示例#14
0
	def run_convert_to_game_skin( self, args ):
		objects = cmds.ls( sl = True )
		
		skin_convert_tool.Skin_Convert_Tool().convert_to_game_skin( objects )
		
		oopmaya.message( 'Finished converting mesh onto joints!' )
示例#15
0
	def run_build_crack_distance( self, *args ):
		dis_locator = cmds.ls( sl = True )[0]
		
		simulation_tool.Simulation_Tool().build_crack_distance( dis_locator )
		
		oopmaya.message( 'Build crack distance!' )
示例#16
0
	def run_create_cluster( self, *args ):
		mesh = cmds.ls( sl = True, objectsOnly = True )[0]
		
		crack_tool.Crack_Tool().create_cluster( mesh )
		
		oopmaya.message( 'Created cluster!' )
示例#17
0
    def run_convert_to_game_skin(self, args):
        objects = cmds.ls(sl=True)

        skin_convert_tool.Skin_Convert_Tool().convert_to_game_skin(objects)

        oopmaya.message('Finished converting mesh onto joints!')
示例#18
0
	def run_create_plane_rig( self, *args ):
		crack_tool.Crack_Tool().create_plane_rig()
		
		oopmaya.message( 'Created plane rig!' )