From 2496595caaf744a70e4600d44ec2cefd8e12c895 Mon Sep 17 00:00:00 2001 From: Thomas Blommaert Date: Tue, 14 May 2024 17:11:56 +0200 Subject: [PATCH] feat: sorted formation objects --- src/modules/sbstudio/plugin/selection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/sbstudio/plugin/selection.py b/src/modules/sbstudio/plugin/selection.py index eeb4507b..6fdf15b8 100644 --- a/src/modules/sbstudio/plugin/selection.py +++ b/src/modules/sbstudio/plugin/selection.py @@ -58,7 +58,7 @@ def get_selected_objects(*, context: Optional[Context] = None): the list of selected objects, taking into account the current mode """ if context.mode == "OBJECT": - return context.selected_objects + return sorted(context.selected_objects, key=lambda obj: obj.name) # sort for light effects order else: active_object = context.active_object return [active_object] if active_object else []