mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix #7205. Regression when switching from drawing mode to model mode didn't hide drawings.
This commit is contained in:
@@ -2226,6 +2226,7 @@ class ActivateModel(bpy.types.Operator):
|
||||
)
|
||||
|
||||
tool.Blender.reset_object_visibility()
|
||||
tool.Drawing.hide_all_drawing_collections()
|
||||
tool.Blender.update_viewport()
|
||||
bonsai.bim.handler.refresh_ui_data()
|
||||
|
||||
|
||||
@@ -2591,3 +2591,10 @@ class Drawing(bonsai.core.tool.Drawing):
|
||||
ifcopenshell.api.document.remove_reference(tool.Ifc.get(), reference=reference)
|
||||
|
||||
tool.Drawing.import_sheets()
|
||||
|
||||
@classmethod
|
||||
def hide_all_drawing_collections(cls) -> None:
|
||||
for element in tool.Ifc.get().by_type("IfcAnnotation"):
|
||||
if element.ObjectType == "DRAWING" and (obj := tool.Ifc.get_object(element)):
|
||||
print('found element', element)
|
||||
tool.Blender.get_layer_collection(obj.users_collection[0]).hide_viewport = True
|
||||
|
||||
Reference in New Issue
Block a user