mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Fix some DEFVALs to use the right type
- Use `StringName()` in DEFVAL for StringNames. - Use `Variant()` in DEFVAL for Variants.
This commit is contained in:
@@ -58,6 +58,14 @@ void AnimationPlayer::_seek_bind_compat_80813(double p_time, bool p_update) {
|
||||
seek(p_time, p_update, false);
|
||||
}
|
||||
|
||||
void AnimationPlayer::_play_compat_84906(const StringName &p_name, double p_custom_blend, float p_custom_scale, bool p_from_end) {
|
||||
play(p_name, p_custom_blend, p_custom_scale, p_from_end);
|
||||
}
|
||||
|
||||
void AnimationPlayer::_play_backwards_compat_84906(const StringName &p_name, double p_custom_blend) {
|
||||
play_backwards(p_name, p_custom_blend);
|
||||
}
|
||||
|
||||
void AnimationPlayer::_bind_compatibility_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_process_callback", "mode"), &AnimationPlayer::_set_process_callback_bind_compat_80813);
|
||||
ClassDB::bind_method(D_METHOD("get_process_callback"), &AnimationPlayer::_get_process_callback_bind_compat_80813);
|
||||
@@ -66,6 +74,8 @@ void AnimationPlayer::_bind_compatibility_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_root", "path"), &AnimationPlayer::_set_root_bind_compat_80813);
|
||||
ClassDB::bind_method(D_METHOD("get_root"), &AnimationPlayer::_get_root_bind_compat_80813);
|
||||
ClassDB::bind_compatibility_method(D_METHOD("seek", "seconds", "update"), &AnimationPlayer::_seek_bind_compat_80813, DEFVAL(false));
|
||||
ClassDB::bind_compatibility_method(D_METHOD("play", "name", "custom_blend", "custom_speed", "from_end"), &AnimationPlayer::_play_compat_84906, DEFVAL(""), DEFVAL(-1), DEFVAL(1.0), DEFVAL(false));
|
||||
ClassDB::bind_compatibility_method(D_METHOD("play_backwards", "name", "custom_blend"), &AnimationPlayer::_play_backwards_compat_84906, DEFVAL(""), DEFVAL(-1));
|
||||
BIND_ENUM_CONSTANT(ANIMATION_PROCESS_PHYSICS);
|
||||
BIND_ENUM_CONSTANT(ANIMATION_PROCESS_IDLE);
|
||||
BIND_ENUM_CONSTANT(ANIMATION_PROCESS_MANUAL);
|
||||
|
||||
Reference in New Issue
Block a user