mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 06:18:09 +00:00
option to set active system
Now it's possible to set in UI active system (currently it's done "select" button next to the system). Also changed the elements that are going to be decorated with system decorator. Previously it was decorating all the mep elements in the projects which was very performance heavy on large projects.
This commit is contained in:
@@ -62,7 +62,7 @@ class TestRemoveSystem:
|
||||
class TestEnableEditingSystem:
|
||||
def test_run(self, system):
|
||||
system.import_system_attributes("system").should_be_called()
|
||||
system.set_active_system("system").should_be_called()
|
||||
system.set_active_edited_system("system").should_be_called()
|
||||
subject.enable_editing_system(system, system="system")
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@ class TestUnassignSystem:
|
||||
class TestSelectSystemProducts:
|
||||
def test_run(self, system):
|
||||
system.select_system_products("system").should_be_called()
|
||||
system.set_active_system("system").should_be_called()
|
||||
subject.select_system_products(system, system="system")
|
||||
|
||||
|
||||
|
||||
@@ -53,9 +53,9 @@ class TestDeleteElementObjects(NewFile):
|
||||
|
||||
class TestDisableEditingSystem(NewFile):
|
||||
def test_run(self):
|
||||
bpy.context.scene.BIMSystemProperties.active_system_id = 10
|
||||
bpy.context.scene.BIMSystemProperties.edited_system_id = 10
|
||||
subject.disable_editing_system()
|
||||
assert bpy.context.scene.BIMSystemProperties.active_system_id == 0
|
||||
assert bpy.context.scene.BIMSystemProperties.edited_system_id == 0
|
||||
|
||||
|
||||
class TestDisableSystemEditingUI(NewFile):
|
||||
@@ -219,5 +219,5 @@ class TestSetActiveSystem(NewFile):
|
||||
ifc = ifcopenshell.file()
|
||||
tool.Ifc().set(ifc)
|
||||
system = ifcopenshell.api.run("system.add_system", ifc, ifc_class="IfcSystem")
|
||||
subject.set_active_system(system)
|
||||
assert bpy.context.scene.BIMSystemProperties.active_system_id == system.id()
|
||||
subject.set_active_edited_system(system)
|
||||
assert bpy.context.scene.BIMSystemProperties.edited_system_id == system.id()
|
||||
|
||||
Reference in New Issue
Block a user