def split_meshes_with_weight(meshes_and_weights, depth=0): soups = [(m.face_soup()[0], m.vertex_field(vertex_position_id)) for m,weight in meshes_and_weights] soup,X = merge_meshes(soups) weights = [] for m,weight in meshes_and_weights: weights += [weight] * m.n_faces return meshify(*split_soup_with_weight(soup, X, weights, depth))
def split_meshes_with_weight(meshes_and_weights, depth=0): soups = [(m.face_soup()[0], m.vertex_field(vertex_position_id)) for m, weight in meshes_and_weights] soup, X = merge_meshes(soups) weights = [] for m, weight in meshes_and_weights: weights += [weight] * m.n_faces return meshify(*split_soup_with_weight(soup, X, weights, depth))
def split_meshes(meshes, depth=0): soups = [(m.face_soup()[0], m.vertex_field(vertex_position_id)) for m in meshes] return meshify(*split_soups(soups,depth))
def split_mesh(mesh, depth=0): return meshify(*split_soup(mesh.face_soup()[0], mesh.vertex_field(vertex_position_id), depth))
def split_mesh_with_weight(mesh, weights, depth=0): return meshify(*split_soup_with_weight(mesh.face_soup()[0], mesh.vertex_field(vertex_position_id), weights, depth))
def split_meshes(meshes, depth=0): soups = [(m.face_soup()[0], m.vertex_field(vertex_position_id)) for m in meshes] return meshify(*split_soups(soups, depth))
def split_mesh_with_weight(mesh, weights, depth=0): return meshify( *split_soup_with_weight(mesh.face_soup( )[0], mesh.vertex_field(vertex_position_id), weights, depth))