diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-12-09 00:47:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-09 00:47:20 +0100 |
commit | b8afafa2262684ee2b451b5686679baf984c3e59 (patch) | |
tree | e8ace414432a52911c1e35b5381bbdf823cc82a2 /scene | |
parent | 015cfc592deb6339965c638cf345198b6a0ed0c5 (diff) | |
parent | 2d07fe29208b9ccef31ab654ca5405edac7a0de7 (diff) |
Merge pull request #14384 from willnationsdev/docs-api-fix
[DOCS] AnimationPlayer prop API fixed
Diffstat (limited to 'scene')
-rw-r--r-- | scene/animation/animation_player.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index f3e750d0da..96a59380fa 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -1324,9 +1324,7 @@ void AnimationPlayer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_root"), &AnimationPlayer::get_root); ClassDB::bind_method(D_METHOD("seek", "seconds", "update"), &AnimationPlayer::seek, DEFVAL(false)); - ClassDB::bind_method(D_METHOD("advance", "delta"), &AnimationPlayer::advance); - ClassDB::bind_method(D_METHOD("get_anim_position"), &AnimationPlayer::get_current_animation_position); - ClassDB::bind_method(D_METHOD("get_anim_length"), &AnimationPlayer::get_current_animation_length); + ClassDB::bind_method(D_METHOD("get_position"), &AnimationPlayer::get_current_animation_position); ClassDB::bind_method(D_METHOD("find_animation", "animation"), &AnimationPlayer::find_animation); @@ -1335,6 +1333,11 @@ void AnimationPlayer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_animation_process_mode", "mode"), &AnimationPlayer::set_animation_process_mode); ClassDB::bind_method(D_METHOD("get_animation_process_mode"), &AnimationPlayer::get_animation_process_mode); + ClassDB::bind_method(D_METHOD("get_current_animation_position"), &AnimationPlayer::get_current_animation_position); + ClassDB::bind_method(D_METHOD("get_current_animation_length"), &AnimationPlayer::get_current_animation_length); + + ClassDB::bind_method(D_METHOD("advance", "delta"), &AnimationPlayer::advance); + ADD_GROUP("Playback Options", "playback_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_animation_process_mode", "get_animation_process_mode"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "playback_default_blend_time", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_default_blend_time", "get_default_blend_time"); @@ -1343,7 +1346,7 @@ void AnimationPlayer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::STRING, "autoplay"), "set_autoplay", "get_autoplay"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale"), "set_speed_scale", "get_speed_scale"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "active"), "set_active", "is_active"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_anim"), "set_current_anim", "get_current_anim"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_animation"), "set_current_animation", "get_current_animation"); ADD_SIGNAL(MethodInfo("animation_finished", PropertyInfo(Variant::STRING, "name"))); ADD_SIGNAL(MethodInfo("animation_changed", PropertyInfo(Variant::STRING, "old_name"), PropertyInfo(Variant::STRING, "new_name"))); |