mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
Fix #1872. Bug where duplicating an object didn't duplicate its styles.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user