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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user