Merge pull request #83417 from Rubonnek/show-animation-mixer-warning-when-relevant

Show AnimationMixer warning for non-numeric types only when relevant
This commit is contained in:
Rémi Verschelde 2023-10-16 10:43:26 +02:00
commit aa0be93a89
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 17 additions and 15 deletions

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.");