Railing/roof/stair/window now use default collection. Continue removing old "active collection" code.

This commit is contained in:
Dion Moult
2024-06-10 16:13:00 +10:00
parent e520c2ce8a
commit 1b63d9e88f
8 changed files with 0 additions and 43 deletions
-3
View File
@@ -92,7 +92,6 @@ class TestCreateProject:
project.run_aggregate_assign_object(relating_obj="building", related_obj="storey").should_be_called()
project.set_context("body").should_be_called()
project.set_active_spatial_element("storey").should_be_called()
project.load_default_thumbnails().should_be_called()
project.set_default_context().should_be_called()
@@ -125,7 +124,6 @@ class TestCreateProject:
project.run_aggregate_assign_object(relating_obj="building", related_obj="storey").should_be_called()
project.set_context("body").should_be_called()
project.set_active_spatial_element("storey").should_be_called()
project.append_all_types_from_template("template").should_be_called()
@@ -167,7 +165,6 @@ class TestCreateProject:
project.run_aggregate_assign_object(relating_obj="building", related_obj="storey").should_be_called()
project.set_context("body").should_be_called()
project.set_active_spatial_element("storey").should_be_called()
project.load_default_thumbnails().should_be_called()
project.set_default_context().should_be_called()
-15
View File
@@ -87,21 +87,6 @@ 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)
obj.BIMObjectProperties.collection = collection
collection.BIMCollectionProperties.obj = 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()