Add hint for oneshot & warning when it will be updated continuously
This commit is contained in:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user