Skip to content

Commit

Permalink
Fix object retrieval error in blender_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aelmiger committed May 13, 2024
1 parent 3be04d1 commit 243a6b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syclops/utility/blender_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,13 @@ def get(self) -> Union[bpy.types.Object, bpy.types.Collection]:
"""
if self.type == "OBJECT":
for obj in bpy.data.objects:
if obj.get("UUID") == self.uuid:
if obj.get("POINTER_UUID") == self.uuid:
return obj
elif self.type == "COLLECTION":
for collection in bpy.data.collections:
if collection.name == self.uuid:
return collection
err_msg = "Object with UUID {0} not found".format(self.uuid)
err_msg = "Object with POINTER_UUID {0} not found".format(self.uuid)
logging.error(err_msg)
raise ValueError(err_msg)

Expand Down

0 comments on commit 243a6b8

Please sign in to comment.