Commit a5334026 by kbake

Will now try to use the existing animation's name for filename, defaults to…

Will now try to use the existing animation's name for filename, defaults to previous value in case there's no name
parent a2903fc5
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment