summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-08-30 08:37:11 +0200
committerGitHub <noreply@github.com>2022-08-30 08:37:11 +0200
commit4d7628be85aad112131f28e317e7ef3a28cb9708 (patch)
tree932b34f4fbc8e350d09e711ce96e6140ef2190b3
parentf925572976a23b1a8e4c422cce59accb4390f71a (diff)
parent0f17fe642c8ec21b7877cd3f6911f22ba0874255 (diff)
Merge pull request #45764 from gongpha/update-animation-tree-editor-when-selected
Update all AnimationTree's editors when editing
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index bce4c9de8e..ed231c446b 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -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();