Skip to content

Commit

Permalink
fix: log error message when image cannot be loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeCrassous committed Aug 6, 2020
1 parent e342c3b commit 41aaab6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mixer/blender_data/specifics.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ def bpy_data_ctor(collection_name: str, proxy: BpyIDProxy) -> Union[T.ID, None]:
else:
path = proxy.data("filepath")
if path != "":
image = collection.load(path)
try:
image = collection.load(path)
except RuntimeError as e:
logger.warning(f'Cannot load image at path "{path}". Exception: ')
logger.warning(f"... {e}")
return None
# we may have received an ID named xxx.001 although filepath is xxx, so fix it now
image.name = proxy.data("name")
return image
Expand Down

0 comments on commit 41aaab6

Please sign in to comment.