Fix bug where style colours were not auto synchronised.

This commit is contained in:
Dion Moult
2021-11-11 14:18:44 +11:00
parent 9355969110
commit d5b92c0fea
13 changed files with 106 additions and 49 deletions
-19
View File
@@ -189,22 +189,3 @@ class TestImportSurfaceAttributes(NewFile):
assert len(obj.BIMStyleProperties.attributes) == 2
assert obj.BIMStyleProperties.attributes.get("Name").string_value == "Name"
assert obj.BIMStyleProperties.attributes.get("Side").enum_value == "BOTH"
class TestLink(NewFile):
def test_run(self):
obj = bpy.data.materials.new("Material")
ifc = ifcopenshell.file()
style = ifc.createIfcSurfaceStyle()
subject.link(style, obj)
assert obj.BIMMaterialProperties.ifc_style_id == style.id()
class TestUnlink(NewFile):
def test_run(self):
obj = bpy.data.materials.new("Material")
ifc = ifcopenshell.file()
style = ifc.createIfcSurfaceStyle()
subject.link(style, obj)
subject.unlink(obj)
assert obj.BIMMaterialProperties.ifc_style_id == 0