See #2520. You can now duplicate drawings.

This commit is contained in:
Dion Moult
2023-02-08 12:29:40 +11:00
parent 4e308a6e31
commit 88bddb9531
12 changed files with 117 additions and 13 deletions
+18
View File
@@ -32,6 +32,16 @@ class TestImplementsTool(NewFile):
assert isinstance(subject(), blenderbim.core.tool.Drawing)
class TestCopyDrawingRepresentation(NewFile):
def test_run(self):
ifc = ifcopenshell.file()
tool.Ifc.set(ifc)
source = ifc.createIfcAnnotation(Representation=ifc.createIfcProductDefinitionShape())
dest = ifc.createIfcAnnotation()
subject.copy_drawing_representation(source, dest)
assert dest.Representation.is_a("IfcProductDefinitionShape")
class TestCreateAnnotationObject(NewFile):
def test_nothing(self):
pass
@@ -562,6 +572,14 @@ class TestSetDrawingCollectionName(NewFile):
assert collection.name == "IfcGroup/Foobaz"
class TestSetName(NewFile):
def test_run(self):
ifc = ifcopenshell.file()
drawing = ifc.createIfcAnnotation()
subject.set_name(drawing, "Name")
assert drawing.Name == "Name"
class TestShowDecorations(NewFile):
def test_run(self):
bpy.context.scene.DocProperties.should_draw_decorations = False