You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix redraw timing in AnimationBlendTreeEditor
This commit is contained in:
@@ -50,10 +50,18 @@
|
||||
#include "scene/scene_string_names.h"
|
||||
|
||||
void AnimationTreeEditor::edit(AnimationTree *p_tree) {
|
||||
if (p_tree && !p_tree->is_connected("animation_player_changed", callable_mp(this, &AnimationTreeEditor::_animation_list_changed))) {
|
||||
p_tree->connect("animation_player_changed", callable_mp(this, &AnimationTreeEditor::_animation_list_changed), CONNECT_DEFERRED);
|
||||
}
|
||||
|
||||
if (tree == p_tree) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (tree && tree->is_connected("animation_player_changed", callable_mp(this, &AnimationTreeEditor::_animation_list_changed))) {
|
||||
tree->disconnect("animation_player_changed", callable_mp(this, &AnimationTreeEditor::_animation_list_changed));
|
||||
}
|
||||
|
||||
tree = p_tree;
|
||||
|
||||
Vector<String> path;
|
||||
@@ -73,6 +81,13 @@ void AnimationTreeEditor::_path_button_pressed(int p_path) {
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationTreeEditor::_animation_list_changed() {
|
||||
AnimationNodeBlendTreeEditor *bte = AnimationNodeBlendTreeEditor::get_singleton();
|
||||
if (bte) {
|
||||
bte->update_graph();
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationTreeEditor::_update_path() {
|
||||
while (path_hb->get_child_count() > 1) {
|
||||
memdelete(path_hb->get_child(1));
|
||||
|
||||
Reference in New Issue
Block a user