1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-21 14:57:09 +00:00

Name new resource files with snake_case

This commit is contained in:
foxydevloper
2021-07-29 20:42:07 -04:00
parent bdcc8741e4
commit ae7a74625d
2 changed files with 6 additions and 3 deletions

View File

@@ -408,7 +408,8 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource> &p_resource)
if (p_resource->get_name() != "") {
path = p_resource->get_name() + "." + extensions.front()->get().to_lower();
} else {
path = "new_" + p_resource->get_class().to_lower() + "." + extensions.front()->get().to_lower();
String resource_name_snake_case = p_resource->get_class().camelcase_to_underscore();
path = "new_" + resource_name_snake_case + "." + extensions.front()->get().to_lower();
}
}
}