Show AnimationMixer warning for non-numeric types only when relevant

This commit is contained in:
Wilson E. Alvarez 2023-10-15 19:11:27 -04:00
parent a574c0296b
commit 4c8497092a
No known key found for this signature in database
GPG Key ID: A32174A3D2ED3F9E

View File

@ -871,6 +871,7 @@ bool AnimationMixer::_update_caches() {
// TODO: Currently, misc type cannot be blended. In the future,
// it should have a separate blend weight, just as bool is converted to 0 and 1.
// Then, it should provide the correct precedence value.
if (track_value->is_continuous) {
switch (track_value->init_value.get_type()) {
case Variant::NIL:
case Variant::STRING_NAME:
@ -888,6 +889,7 @@ bool AnimationMixer::_update_caches() {
default: {
}
}
}
if (was_continuous != track_value->is_continuous) {
WARN_PRINT_ONCE_ED("Value Track: " + String(path) + " has different update modes between some animations may be blended. Blending prioritizes UpdateMode.UPDATE_CONTINUOUS, so the process treat UpdateMode.UPDATE_DISCRETE as UpdateMode.UPDATE_CONTINUOUS with InterpolationType.INTERPOLATION_NEAREST.");