AnimationMultiTrackKeyEdit Allow editing easing if it's possible for all edited tracks

(cherry picked from commit 1d890e16f7)
This commit is contained in:
kleonc 2021-06-17 23:28:04 +02:00 committed by Rémi Verschelde
parent 59d72279ae
commit 4ae0310cec
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1175,31 +1175,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 (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::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));
}
}
}