mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 03:37:21 +00:00
The collector should be responsible for handling global fixed display settings too perhaps
This commit is contained in:
@@ -593,12 +593,8 @@ class ShowOpenings(Operator, tool.Ifc.Operator):
|
|||||||
bonsai.core.geometry.edit_object_placement(tool.Ifc, tool.Geometry, tool.Surveyor, obj=obj)
|
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_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)
|
openings_objects = tool.Model.load_openings(openings_elements_to_load)
|
||||||
for opening in openings_objects:
|
for obj in openings_objects:
|
||||||
self.on_new_opening_obj(opening)
|
tool.Root.add_tracked_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"
|
|
||||||
|
|
||||||
|
|
||||||
class UpdateOpeningsFocus(Operator):
|
class UpdateOpeningsFocus(Operator):
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ class Collector(bonsai.core.tool.Collector):
|
|||||||
elif element.is_a("IfcOpeningElement"):
|
elif element.is_a("IfcOpeningElement"):
|
||||||
collection = cls._create_project_child_collection("IfcOpeningElement")
|
collection = cls._create_project_child_collection("IfcOpeningElement")
|
||||||
cls.link_collection_object_safe(collection, obj)
|
cls.link_collection_object_safe(collection, obj)
|
||||||
|
obj.display_type = "WIRE"
|
||||||
elif element.is_a("IfcSpace"):
|
elif element.is_a("IfcSpace"):
|
||||||
collection = cls._create_project_child_collection("IfcSpace")
|
collection = cls._create_project_child_collection("IfcSpace")
|
||||||
cls.link_collection_object_safe(collection, obj)
|
cls.link_collection_object_safe(collection, obj)
|
||||||
|
|||||||
Reference in New Issue
Block a user