You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Will now try to use the existing animation's name for filename, defaults to previous value in case there's no name
This commit is contained in:
@@ -431,8 +431,13 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource>& p_resource)
|
|||||||
|
|
||||||
String existing;
|
String existing;
|
||||||
if (extensions.size()) {
|
if (extensions.size()) {
|
||||||
|
if( p_resource->get_name() != "" ) {
|
||||||
|
existing = p_resource->get_name() + "." + extensions.front()->get().to_lower();
|
||||||
|
}
|
||||||
|
else {
|
||||||
existing = "new_" + p_resource->get_class().to_lower() + "." + extensions.front()->get().to_lower();
|
existing = "new_" + p_resource->get_class().to_lower() + "." + extensions.front()->get().to_lower();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
file->set_current_path(existing);
|
file->set_current_path(existing);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user