aboutsummaryrefslogtreecommitdiff
path: root/editor/animation_track_editor.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2018-06-08 13:59:29 -0300
committerJuan Linietsky2018-06-08 13:59:29 -0300
commit7572b31a396955e270dc9aeddbcda6e1f8b6cfd2 (patch)
treeac190e4bfe486ba7e94b2e8fb4c8521b708d23f2 /editor/animation_track_editor.cpp
parent9cb17d7af8c9e49bc7baee2e70144490d6548b1d (diff)
downloadgodot-7572b31a396955e270dc9aeddbcda6e1f8b6cfd2.tar.gz
godot-7572b31a396955e270dc9aeddbcda6e1f8b6cfd2.tar.zst
godot-7572b31a396955e270dc9aeddbcda6e1f8b6cfd2.zip
Diffstat (limited to 'editor/animation_track_editor.cpp')
-rw-r--r--editor/animation_track_editor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index d8b90bb8d..43e08ca32 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -3535,6 +3535,11 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
return;
}
+ if (node == AnimationPlayerEditor::singleton->get_player()) {
+ EditorNode::get_singleton()->show_warning(TTR("An animation player can't animate itself, only other players."));
+ return;
+ }
+
undo_redo->create_action("Add Track");
undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type);
undo_redo->add_do_method(animation.ptr(), "track_set_path", animation->get_track_count(), path_to);