Skip to content

Commit

Permalink
feat(blender): import ply using bpy.op.wm.ply_import
Browse files Browse the repository at this point in the history
The 'import_mesh.ply' was replaced by '.wm.ply_import'.
  • Loading branch information
Griperis committed Aug 6, 2024
1 parent 2dbf982 commit 4221571
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blenderproc/python/loader/ObjectLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ def load_obj(filepath: str, cached_objects: Optional[Dict[str, List[MeshObject]]
file.write(new_ply_file_content)

# Load .ply mesh
bpy.ops.import_mesh.ply(filepath=tmp_ply_file, **kwargs)
bpy.ops.wm.ply_import(filepath=tmp_ply_file, **kwargs)

else: # If no texture was given
# load a .ply mesh
bpy.ops.import_mesh.ply(filepath=filepath, **kwargs)
bpy.ops.wm.ply_import(filepath=filepath, **kwargs)
# Create default material
material = create_material('ply_material')
material.map_vertex_color()
Expand Down

0 comments on commit 4221571

Please sign in to comment.