Merge pull request #45764 from gongpha/update-animation-tree-editor-when-selected

Update all AnimationTree's editors when editing
This commit is contained in:
Rémi Verschelde 2022-08-30 08:37:11 +02:00 committed by GitHub
commit 4d7628be85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,10 +59,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 = ObjectID();
}
edit_path(path);
}
void AnimationTreeEditor::_path_button_pressed(int p_path) {
@ -129,6 +130,11 @@ void AnimationTreeEditor::edit_path(const Vector<String> &p_path) {
} else {
current_root = ObjectID();
edited_path = button_path;
for (int i = 0; i < editors.size(); i++) {
editors[i]->edit(Ref<AnimationNode>());
editors[i]->hide();
}
}
_update_path();