1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Merge pull request #48570 from Calinou/animation-editors-new-name

Tweak the name for new animations in the editor
This commit is contained in:
Rémi Verschelde
2023-01-20 08:50:40 +01:00
2 changed files with 4 additions and 4 deletions

View File

@@ -324,7 +324,7 @@ void AnimationPlayerEditor::_animation_selected(int p_which) {
void AnimationPlayerEditor::_animation_new() {
int count = 1;
String base = TTR("New Anim");
String base = "new_animation";
String current_library_name = "";
if (animation->has_selectable_items()) {
String current_animation_name = animation->get_item_text(animation->get_selected());
@@ -337,7 +337,7 @@ void AnimationPlayerEditor::_animation_new() {
while (true) {
String attempt = base;
if (count > 1) {
attempt += " (" + itos(count) + ")";
attempt += vformat("_%d", count);
}
if (player->has_animation(attempt_prefix + attempt)) {
count++;