New feature to select all objects in same container

This commit is contained in:
Dion Moult
2021-11-07 17:02:05 +11:00
parent 05068754b9
commit 61e510e45c
9 changed files with 71 additions and 0 deletions
+17
View File
@@ -128,6 +128,15 @@ class TestGetContainer(NewFile):
assert subject.get_container(wall) == site
class TestGetDecomposedElements(NewFile):
def test_run(self):
ifc = ifcopenshell.file()
site = ifc.createIfcSite()
wall = ifc.createIfcWall()
ifcopenshell.api.run("spatial.assign_container", ifc, product=wall, relating_structure=site)
assert subject.get_decomposed_elements(site) == [wall]
class TestGetObjectMatrix(NewFile):
def test_run(self):
obj = bpy.data.objects.new("Object", None)
@@ -192,6 +201,14 @@ class TestRunSpatialAssignContainer(NewFile):
pass
class TestSelectObject(NewFile):
def test_run(self):
obj = bpy.data.objects.new("Object", None)
bpy.context.scene.collection.objects.link(obj)
subject.select_object(obj)
assert obj in bpy.context.selected_objects
class TestSetActiveObject(NewFile):
def test_run(self):
obj = bpy.data.objects.new("Object", None)