mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-01 01:16:27 +00:00
Fix import bug where truncated material names cause import failure
This commit is contained in:
@@ -113,6 +113,8 @@ class MaterialCreator():
|
|||||||
continue
|
continue
|
||||||
elif 'surface-style-' in material:
|
elif 'surface-style-' in material:
|
||||||
material = material.split('-')[2]
|
material = material.split('-')[2]
|
||||||
|
if len(material) > 63: # Blender material names are up to 63 characters
|
||||||
|
material = material[0:63]
|
||||||
material_to_slot[i] = slots.index(material)
|
material_to_slot[i] = slots.index(material)
|
||||||
|
|
||||||
if len(mesh.polygons) == len(mesh['ios_material_ids']):
|
if len(mesh.polygons) == len(mesh['ios_material_ids']):
|
||||||
|
|||||||
Reference in New Issue
Block a user