Skip to content

Commit

Permalink
Fixing reported bug in UV tools where no material is present in slot
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDuckCow committed Jun 6, 2021
1 parent 7374915 commit 78c1d43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MCprep_addon/materials/uv_tools.py
Expand Up @@ -59,7 +59,7 @@ def get_uv_bounds_per_material(obj):
for poly in obj.data.polygons:
m_index = poly.material_index
mslot = obj.material_slots[m_index]
if not mslot:
if not mslot or not mslot.material:
continue

# TODO: Consider breaking early after reaching the first N hits of a
Expand Down

0 comments on commit 78c1d43

Please sign in to comment.