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.
This commit is contained in:
aaronp64
2025-04-22 12:17:27 -04:00
parent 09ea7bc6a3
commit 8584737525

View File

@ -119,10 +119,11 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
menu->clear(false);
animations_menu->clear();
animations_to_add.clear();
LocalVector<StringName> classes;
ClassDB::get_inheriters_from_class("AnimationRootNode", classes);
classes.sort_custom<StringName::AlphCompare>();
ClassDB::get_inheriters_from_class("AnimationRootNode", classes);
menu->add_submenu_node_item(TTR("Add Animation"), animations_menu);
List<StringName> names;