Add hint for oneshot & warning when it will be updated continuously

This commit is contained in:
Silc Lizard (Tokage) Renew
2024-08-18 04:00:43 +09:00
parent db66bd35af
commit 761a20f7a7
11 changed files with 37 additions and 8 deletions

View File

@ -716,6 +716,15 @@ bool AnimationMixer::_update_caches() {
}
}
if (is_value && callback_mode_discrete == ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS) {
if (child) {
PropertyInfo prop_info;
ClassDB::get_property_info(child->get_class_name(), path.get_concatenated_subnames(), &prop_info);
if (prop_info.hint == PROPERTY_HINT_ONESHOT) {
WARN_PRINT_ED(vformat("%s: '%s', Value Track: '%s' is oneshot property, but will be continuously updated. Consider setting a value other than ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS to AnimationMixer.callback_mode_dominant.", mixer_name, String(E), String(path)));
}
}
}
} break;
case Animation::TYPE_POSITION_3D:
case Animation::TYPE_ROTATION_3D: