mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
Disallow via add track for animation player to animate itself, fixes #19425
This commit is contained in:
parent
9cb17d7af8
commit
7572b31a39
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user