From a014cd58e3717be5c52d401523d29d28c43e7909 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 14 Oct 2024 15:34:45 +0500 Subject: [PATCH] fix toggling link selectibility after be68a8f #5524 --- src/bonsai/bonsai/bim/module/project/operator.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/project/operator.py b/src/bonsai/bonsai/bim/module/project/operator.py index a08a67d0d8..419ecd9730 100644 --- a/src/bonsai/bonsai/bim/module/project/operator.py +++ b/src/bonsai/bonsai/bim/module/project/operator.py @@ -1205,9 +1205,11 @@ class ToggleLinkSelectability(bpy.types.Operator): props = context.scene.BIMProjectProperties link = props.links.get(self.link) self.library_filepath = tool.Blender.ensure_blender_path_is_abs(Path(self.link).with_suffix(".ifc.cache.blend")) + link.is_selectable = (is_selectable := not link.is_selectable) for collection in self.get_linked_collections(): - collection.hide_select = not collection.hide_select - link.is_selectable = not collection.hide_select + collection.hide_select = not is_selectable + if handle := link.empty_handle: + handle.hide_select = not is_selectable return {"FINISHED"} def get_linked_collections(self) -> list[bpy.types.Collection]: