fix issue unlinking objects after d219856

`unlink_style` doesn't need `tool.Style` anymore and `obj` argument was replaced with `style`
This commit is contained in:
Andrej730
2024-05-29 12:23:06 +05:00
parent d87665de7e
commit cf9f792a3b
+1 -1
View File
@@ -315,7 +315,7 @@ class Root(blenderbim.core.tool.Root):
obj.data.BIMMeshProperties.ifc_definition_id = 0
for material_slot in obj.material_slots:
if material_slot.material:
blenderbim.core.style.unlink_style(tool.Ifc, tool.Style, obj=material_slot.material)
blenderbim.core.style.unlink_style(tool.Ifc, style=material_slot.material)
blenderbim.core.material.unlink_material(tool.Ifc, obj=material_slot.material)
if "Ifc" in obj.name and "/" in obj.name:
obj.name = obj.name.split("/", 1)[1]