Fix #1872. Bug where duplicating an object didn't duplicate its styles.

This commit is contained in:
Dion Moult
2021-11-11 14:51:05 +11:00
parent d5b92c0fea
commit f5f88f4b97
6 changed files with 49 additions and 6 deletions
+17
View File
@@ -169,6 +169,18 @@ class TestGetRepresentationName(NewFile):
assert subject.get_representation_name(representation) == f"{context.id()}/{representation.id()}"
class TestGetStyles(NewFile):
def test_run(self):
ifc = ifcopenshell.file()
tool.Ifc.set(ifc)
style = ifc.createIfcSurfaceStyle()
material = bpy.data.materials.new("Material")
tool.Ifc.link(style, material)
obj = bpy.data.objects.new("Object", bpy.data.meshes.new("Mesh"))
obj.data.materials.append(material)
subject.get_styles(obj) == [style]
class TestGetCartesianPointCoordinateOffset(NewFile):
def test_run(self):
obj = bpy.data.objects.new("Object", None)
@@ -387,6 +399,11 @@ class TestRunGeometryUpdateRepresentation(NewFile):
pass
class TestRunStyleAddStyle(NewFile):
def test_nothing(self):
pass
class TestShouldForceFacetedBrep(NewFile):
def test_run(self):
result = bpy.context.scene.BIMGeometryProperties.should_force_faceted_brep