The collector should be responsible for handling global fixed display settings too perhaps

This commit is contained in:
Dion Moult
2025-01-29 19:54:25 +11:00
parent 424cd96fef
commit 121af475a7
2 changed files with 3 additions and 6 deletions
@@ -593,12 +593,8 @@ class ShowOpenings(Operator, tool.Ifc.Operator):
bonsai.core.geometry.edit_object_placement(tool.Ifc, tool.Geometry, tool.Surveyor, obj=obj)
openings_elements_to_load = [o for o in openings_elements if not tool.Ifc.get_object(o)]
openings_objects = tool.Model.load_openings(openings_elements_to_load)
for opening in openings_objects:
self.on_new_opening_obj(opening)
def on_new_opening_obj(self, opening_obj: bpy.types.Object) -> None:
tool.Root.add_tracked_opening(opening_obj, "OPENING")
opening_obj.display_type = "WIRE"
for obj in openings_objects:
tool.Root.add_tracked_opening(obj, "OPENING")
class UpdateOpeningsFocus(Operator):
+1
View File
@@ -65,6 +65,7 @@ class Collector(bonsai.core.tool.Collector):
elif element.is_a("IfcOpeningElement"):
collection = cls._create_project_child_collection("IfcOpeningElement")
cls.link_collection_object_safe(collection, obj)
obj.display_type = "WIRE"
elif element.is_a("IfcSpace"):
collection = cls._create_project_child_collection("IfcSpace")
cls.link_collection_object_safe(collection, obj)