Swapping a Blender material for another is now auto synchronised.

This commit is contained in:
Dion Moult
2021-11-11 18:21:02 +11:00
parent 6f55cd5169
commit 2ec3c4c06b
11 changed files with 59 additions and 5 deletions
+13
View File
@@ -352,6 +352,19 @@ class TestLink(NewFile):
assert obj.BIMMeshProperties.ifc_definition_id == element.id()
class TestRecordObjectMaterials(NewFile):
def test_run(self):
obj = bpy.data.objects.new("Object", bpy.data.meshes.new("Mesh"))
ifc = ifcopenshell.file()
tool.Ifc.set(ifc)
style = ifc.createIfcSurfaceStyle()
material = bpy.data.materials.new("Material")
material.BIMMaterialProperties.ifc_style_id = style.id()
obj.data.materials.append(material)
subject.record_object_materials(obj)
assert obj.data.BIMMeshProperties.material_checksum == str([style.id()])
class TestRecordObjectPosition(NewFile):
def test_run(self):
obj = bpy.data.objects.new("Object", None)