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:
parent
a2903fc51d
commit
a533402695
1 changed files with 6 additions and 1 deletions
|
@ -431,7 +431,12 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource>& p_resource)
|
|||
|
||||
String existing;
|
||||
if (extensions.size()) {
|
||||
existing = "new_" + p_resource->get_class().to_lower() + "." + extensions.front()->get().to_lower();
|
||||
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();
|
||||
}
|
||||
}
|
||||
file->set_current_path(existing);
|
||||
|
||||
|
|
Loading…
Reference in a new issue