Merge pull request #7515 from kbake/issue7433
Use Animation's Name as Filename When Saving
This commit is contained in:
commit
fe8459ac3b
1 changed files with 6 additions and 1 deletions
|
@ -433,8 +433,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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue