diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-18 02:04:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-18 02:04:01 +0200 |
commit | 8ffb631cdb740540ae74edaa5cef8a04d263ccee (patch) | |
tree | 7237fc9be22ccb7ae1f1f4b64566bbbeb81e9135 /editor/animation_track_editor.cpp | |
parent | 407229aeeb2302e96acc26b34b8656ace0b1a20c (diff) | |
parent | 1d890e16f754a8cd245879faca2f0c3cf57c6138 (diff) |
Merge pull request #49695 from kleonc/animation-track-editor-multi-edit-easing
AnimationMultiTrackKeyEdit Allow editing easing if it's possible for all edited tracks
Diffstat (limited to 'editor/animation_track_editor.cpp')
-rw-r--r-- | editor/animation_track_editor.cpp | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 28453eb41d..4196bc8940 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -1168,31 +1168,29 @@ public: p_list->push_back(PropertyInfo(Variant::VECTOR3, "scale")); } break; case Animation::TYPE_VALUE: { - if (!same_key_type) { - break; - } + if (same_key_type) { + Variant v = animation->track_get_key_value(first_track, first_key); - Variant v = animation->track_get_key_value(first_track, first_key); - - if (hint.type != Variant::NIL) { - PropertyInfo pi = hint; - pi.name = "value"; - p_list->push_back(pi); - } else { - PropertyHint hint = PROPERTY_HINT_NONE; - String hint_string; - - if (v.get_type() == Variant::OBJECT) { - //could actually check the object property if exists..? yes i will! - Ref<Resource> res = v; - if (res.is_valid()) { - hint = PROPERTY_HINT_RESOURCE_TYPE; - hint_string = res->get_class(); + if (hint.type != Variant::NIL) { + PropertyInfo pi = hint; + pi.name = "value"; + p_list->push_back(pi); + } else { + PropertyHint hint = PROPERTY_HINT_NONE; + String hint_string; + + if (v.get_type() == Variant::OBJECT) { + //could actually check the object property if exists..? yes i will! + Ref<Resource> res = v; + if (res.is_valid()) { + hint = PROPERTY_HINT_RESOURCE_TYPE; + hint_string = res->get_class(); + } } - } - if (v.get_type() != Variant::NIL) { - p_list->push_back(PropertyInfo(v.get_type(), "value", hint, hint_string)); + if (v.get_type() != Variant::NIL) { + p_list->push_back(PropertyInfo(v.get_type(), "value", hint, hint_string)); + } } } |