Skip to content

Commit 8584737

Browse files
committed
Sort animation nodes in AnimationNodeBlendSpace2DEditor popup menu
Updated AnimationNodeBlendSpace2DEditor::_blend_space_gui_input to sort animation nodes for menu when adding new points, to match ordering in AnimationNodeBlendSpace1DEditor and AnimationNodeStateMachineEditor. Old code had the sort call before adding the node names, so it wasn't reflected in the menu.
1 parent 09ea7bc commit 8584737

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

editor/plugins/animation_blend_space_2d_editor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,11 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
119119
menu->clear(false);
120120
animations_menu->clear();
121121
animations_to_add.clear();
122+
122123
LocalVector<StringName> classes;
124+
ClassDB::get_inheriters_from_class("AnimationRootNode", classes);
123125
classes.sort_custom<StringName::AlphCompare>();
124126

125-
ClassDB::get_inheriters_from_class("AnimationRootNode", classes);
126127
menu->add_submenu_node_item(TTR("Add Animation"), animations_menu);
127128

128129
List<StringName> names;

0 commit comments

Comments
 (0)