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.
This commit is contained in:
Andrej730
2025-11-05 13:53:11 +05:00
parent 6f04eb12d0
commit 5d1f28c3cb
+1 -1
View File
@@ -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