Skip to content

Commit

Permalink
fix(versioning): edge case in new LODs system upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
alexguirre committed May 2, 2024
1 parent f2ca3de commit 02155e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion versioning/versioning_240.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from bpy.types import (
BlendData,
Object,
Mesh,
)


Expand All @@ -26,7 +27,8 @@ def update_lods(obj: Object):
continue

mesh = lod_props.get("mesh", None)
if mesh is None:
# In some cases 'mesh' can end up with an empty bpy id prop, ensure that it is a Mesh
if mesh is None or not isinstance(mesh, Mesh):
continue

new_lods[lod_level_int] = mesh
Expand Down

0 comments on commit 02155e6

Please sign in to comment.