mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 18:57:17 +00:00
#2048. Minor fix.
This commit is contained in:
@@ -1298,10 +1298,7 @@ class IfcImporter:
|
|||||||
name = style.Name or str(style.id())
|
name = style.Name or str(style.id())
|
||||||
blender_material = bpy.data.materials.new(name)
|
blender_material = bpy.data.materials.new(name)
|
||||||
|
|
||||||
old_definition_id = blender_material.BIMObjectProperties.ifc_definition_id
|
self.link_element(style, blender_material)
|
||||||
if not old_definition_id:
|
|
||||||
self.link_element(style, blender_material)
|
|
||||||
blender_material.BIMObjectProperties.ifc_definition_id = old_definition_id
|
|
||||||
|
|
||||||
blender_material.BIMMaterialProperties.ifc_style_id = style.id()
|
blender_material.BIMMaterialProperties.ifc_style_id = style.id()
|
||||||
self.material_creator.styles[style.id()] = blender_material
|
self.material_creator.styles[style.id()] = blender_material
|
||||||
|
|||||||
Reference in New Issue
Block a user