Update all AnimationTree's editors when editing

(cherry picked from commit 0f17fe642c8ec21b7877cd3f6911f22ba0874255)
This commit is contained in:
Kongfa Waroros 2021-02-06 20:32:21 +07:00 committed by Relintai
parent 1fce7ff540
commit 1f3b5fde4e

View File

@ -67,10 +67,11 @@ void AnimationTreeEditor::edit(AnimationTree *p_tree) {
Vector<String> path;
if (tree && tree->has_meta("_tree_edit_path")) {
path = tree->get_meta("_tree_edit_path");
edit_path(path);
} else {
current_root = 0;
}
edit_path(path);
}
void AnimationTreeEditor::_path_button_pressed(int p_path) {
@ -137,6 +138,11 @@ void AnimationTreeEditor::edit_path(const Vector<String> &p_path) {
} else {
current_root = 0;
edited_path = button_path;
for (int i = 0; i < editors.size(); i++) {
editors[i]->edit(Ref<AnimationNode>());
editors[i]->hide();
}
}
_update_path();