Skip to content

Commit

Permalink
Merge pull request #1043 from freLorbeer/main
Browse files Browse the repository at this point in the history
feat(loader): add usd scene loader
  • Loading branch information
cornerfarmer committed Feb 12, 2024
2 parents 84419bb + 00b69da commit 4790683
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blenderproc/python/loader/ObjectLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def load_obj(filepath: str, cached_objects: Optional[Dict[str, List[MeshObject]]
bpy.ops.import_scene.fbx(filepath=filepath)
elif filepath.lower().endswith('.glb') or filepath.lower().endswith('.gltf'):
bpy.ops.import_scene.gltf(filepath=filepath)
elif filepath.lower().endswith('.usda') or filepath.lower().endswith('.usd') or filepath.lower().endswith('.usdc'):
bpy.ops.wm.usd_import(filepath=filepath)

mesh_objects = convert_to_meshes([obj for obj in bpy.context.selected_objects
if obj not in previously_selected_objects])
Expand Down

0 comments on commit 4790683

Please sign in to comment.