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!' )
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!')
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!' )
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!')
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!' )
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!')
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!' )
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!')
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!')
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!')
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!')
def run_create_plane_rig(self, *args): crack_tool.Crack_Tool().create_plane_rig() oopmaya.message('Created plane rig!')
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!' )
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!' )
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!' )
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!' )
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!')
def run_create_plane_rig( self, *args ): crack_tool.Crack_Tool().create_plane_rig() oopmaya.message( 'Created plane rig!' )