summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorSilc Renew <tokage.it.lab@gmail.com>2023-01-12 21:51:03 +0900
committerSilc Renew <tokage.it.lab@gmail.com>2023-01-19 03:10:59 +0900
commite480262c53d70530e1111b1531323107dbc19ebf (patch)
tree94888cae753e513e3719ed0bf69376ca9a81c51d /editor
parent8bfaf098c7ab061d6363d3603c773cd9c48f17d7 (diff)
Allow AnimationNodes to restart when transitioning to the same state
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_properties.cpp9
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp2
2 files changed, 8 insertions, 3 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 8ef394a59f..dae717083b 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -342,12 +342,17 @@ void EditorPropertyTextEnum::_notification(int p_what) {
}
EditorPropertyTextEnum::EditorPropertyTextEnum() {
+ HBoxContainer *hb = memnew(HBoxContainer);
+ add_child(hb);
+
default_layout = memnew(HBoxContainer);
- add_child(default_layout);
+ default_layout->set_h_size_flags(SIZE_EXPAND_FILL);
+ hb->add_child(default_layout);
edit_custom_layout = memnew(HBoxContainer);
+ edit_custom_layout->set_h_size_flags(SIZE_EXPAND_FILL);
edit_custom_layout->hide();
- add_child(edit_custom_layout);
+ hb->add_child(edit_custom_layout);
option_button = memnew(OptionButton);
option_button->set_h_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index f680993026..35bed62cc5 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -187,7 +187,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
String base_path = AnimationTreeEditor::get_singleton()->get_base_path() + String(E) + "/" + F.name;
EditorProperty *prop = EditorInspector::instantiate_property_editor(tree, F.type, base_path, F.hint, F.hint_string, F.usage);
if (prop) {
- prop->set_read_only(read_only);
+ prop->set_read_only(read_only || (F.usage & PROPERTY_USAGE_READ_ONLY));
prop->set_object_and_property(tree, base_path);
prop->update_property();
prop->set_name_split_ratio(0);