The storey is now the default container when starting a project for convenience.

This commit is contained in:
Dion Moult
2022-02-10 11:40:38 +11:00
parent d3a43c6e81
commit 7f212963d5
6 changed files with 35 additions and 2 deletions
+12
View File
@@ -82,6 +82,18 @@ class TestRunUnitAssignSceneUnits(NewFile):
pass
class TestSetActiveSpatialElement(NewFile):
def test_run(self):
obj = bpy.data.objects.new("Foo", None)
collection = bpy.data.collections.new("Foo")
bpy.context.scene.collection.children.link(collection)
collection.objects.link(obj)
layer = bpy.context.view_layer.layer_collection.children["Foo"]
assert bpy.context.view_layer.active_layer_collection != layer
subject.set_active_spatial_element(obj)
assert bpy.context.view_layer.active_layer_collection == layer
class TestSetContext(NewFile):
def test_run(self):
ifc = ifcopenshell.file()