summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-11 22:04:29 +0200
committerGitHub <noreply@github.com>2019-07-11 22:04:29 +0200
commit3045697e4b808a8d5a440517dbb8f90a3f0f9a93 (patch)
tree01520f30a2ea3791435456565bcd27397ab35adb /editor/plugins
parenteb98c5e047d814677a0f9f443afe1ca9a587f9fa (diff)
parent6d92750cf75f35bfcea60d95505b5f6d2bead76b (diff)
Merge pull request #30527 from bojidar-bg/29436-timescale-node-uneditable
Fix AnimationTree editor messing up parameters when nested
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp4
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp5
2 files changed, 4 insertions, 5 deletions
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 65282ccfc2..574f906cfa 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -878,9 +878,7 @@ void AnimationNodeBlendTreeEditor::edit(const Ref<AnimationNode> &p_node) {
blend_tree->disconnect("removed_from_graph", this, "_removed_from_graph");
}
- if (p_node.is_valid()) {
- blend_tree = p_node;
- }
+ blend_tree = p_node;
if (blend_tree.is_null()) {
hide();
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index 2c1da3c10b..28dc5bf5c8 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -115,6 +115,8 @@ void AnimationTreeEditor::edit_path(const Vector<String> &p_path) {
button_path.push_back(p_path[i]);
}
+ edited_path = button_path;
+
for (int i = 0; i < editors.size(); i++) {
if (editors[i]->can_edit(node)) {
editors[i]->edit(node);
@@ -126,10 +128,9 @@ void AnimationTreeEditor::edit_path(const Vector<String> &p_path) {
}
} else {
current_root = 0;
+ edited_path = button_path;
}
- edited_path = button_path;
-
_update_path();
}