You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
@@ -1160,22 +1160,22 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
|
||||
return;
|
||||
}
|
||||
|
||||
String current = animation->get_item_text(animation->get_selected());
|
||||
Ref<Animation> anim = player->get_animation(current);
|
||||
//editor->edit_resource(anim);
|
||||
EditorSettings::get_singleton()->set_resource_clipboard(anim);
|
||||
String current2 = animation->get_item_text(animation->get_selected());
|
||||
Ref<Animation> anim2 = player->get_animation(current2);
|
||||
//editor->edit_resource(anim2);
|
||||
EditorSettings::get_singleton()->set_resource_clipboard(anim2);
|
||||
|
||||
} break;
|
||||
case TOOL_PASTE_ANIM: {
|
||||
|
||||
Ref<Animation> anim = EditorSettings::get_singleton()->get_resource_clipboard();
|
||||
if (!anim.is_valid()) {
|
||||
Ref<Animation> anim2 = EditorSettings::get_singleton()->get_resource_clipboard();
|
||||
if (!anim2.is_valid()) {
|
||||
error_dialog->set_text(TTR("No animation resource on clipboard!"));
|
||||
error_dialog->popup_centered_minsize();
|
||||
return;
|
||||
}
|
||||
|
||||
String name = anim->get_name();
|
||||
String name = anim2->get_name();
|
||||
if (name == "") {
|
||||
name = TTR("Pasted Animation");
|
||||
}
|
||||
@@ -1189,7 +1189,7 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
|
||||
}
|
||||
|
||||
undo_redo->create_action(TTR("Paste Animation"));
|
||||
undo_redo->add_do_method(player, "add_animation", name, anim);
|
||||
undo_redo->add_do_method(player, "add_animation", name, anim2);
|
||||
undo_redo->add_undo_method(player, "remove_animation", name);
|
||||
undo_redo->add_do_method(this, "_animation_player_changed", player);
|
||||
undo_redo->add_undo_method(this, "_animation_player_changed", player);
|
||||
@@ -1206,9 +1206,9 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
|
||||
return;
|
||||
}
|
||||
|
||||
String current = animation->get_item_text(animation->get_selected());
|
||||
Ref<Animation> anim = player->get_animation(current);
|
||||
editor->edit_resource(anim);
|
||||
String current2 = animation->get_item_text(animation->get_selected());
|
||||
Ref<Animation> anim2 = player->get_animation(current2);
|
||||
editor->edit_resource(anim2);
|
||||
|
||||
} break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user