From 5d1f28c3cb233c0399553bfe3fa69eecf9bc19ee Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 5 Nov 2025 13:53:11 +0500 Subject: [PATCH] `validate_object_selection` - don't invalidate active objects when they're not in view layer Since it's not illegal in Blender and can be helpful - e.g. when you were assigning class to ifc space, you would lose selection completely and would need to reselect object to continue working on it. --- src/bonsai/bonsai/tool/blender.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/tool/blender.py b/src/bonsai/bonsai/tool/blender.py index d128101317..beb5d9e025 100644 --- a/src/bonsai/bonsai/tool/blender.py +++ b/src/bonsai/bonsai/tool/blender.py @@ -710,7 +710,7 @@ class Blender(bonsai.core.tool.Blender): new_selected_objects = [o for o in selected_objects if cls.is_valid_data_block(o) and o in view_layer_objects] - if active_object and (not cls.is_valid_data_block(active_object) or active_object not in view_layer_objects): + if active_object and not cls.is_valid_data_block(active_object): active_object = None return context, active_object, new_selected_objects