mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Small fix for 422f772c4
This commit is contained in:
@@ -402,6 +402,8 @@ class Geometry(blenderbim.core.tool.Geometry):
|
||||
return styles
|
||||
|
||||
usage_count = [0] * len(obj.material_slots)
|
||||
if not usage_count: # if there are no materials, polygons will still use index 0
|
||||
return []
|
||||
for poly in obj.data.polygons:
|
||||
usage_count[poly.material_index] += 1
|
||||
styles = [style for style, usage in zip(styles, usage_count, strict=True) if usage > 0]
|
||||
|
||||
Reference in New Issue
Block a user