Merge pull request #71418 from TokageItLab/restart-anim-tree

Allow AnimationStateMachine / AnimationNode to restart when transitioning to the same state
This commit is contained in:
Rémi Verschelde 2023-01-19 21:52:35 +01:00
commit d919d77367
No known key found for this signature in database
GPG key ID: C3336907360768E1
10 changed files with 175 additions and 72 deletions

View file

@ -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);