diff options
| -rw-r--r-- | doc/classes/AnimationPlayer.xml | 4 | ||||
| -rw-r--r-- | scene/2d/tile_map.cpp | 5 | ||||
| -rw-r--r-- | scene/animation/animation_player.cpp | 11 | 
3 files changed, 10 insertions, 10 deletions
| diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 3b1ce37619..6ae0debc3a 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -250,8 +250,8 @@  		<member name="autoplay" type="String" setter="set_autoplay" getter="get_autoplay">  			The name of the animation to play when the scene loads. Default value: [code]""[/code].  		</member> -		<member name="playback_default_blend_time" type="float" setter="set_default_blend_time" getter="get_default_blend_time"> -			The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. Default value: [code]0[/code]. +		<member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation"> +			The name of the current animation. Default value: [code]""[/code].  		</member>  		<member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationPlayer.AnimationProcessMode">  			The process notification in which to update animations. Default value: [enum ANIMATION_PROCESS_IDLE]. diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index c0d0a6e011..609419cd44 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -513,16 +513,13 @@ void TileMap::_update_dirty_quadrants() {  			}  			Ref<OccluderPolygon2D> occluder; -			Vector2 occluder_ofs;  			if (tile_set->tile_get_is_autotile(c.id)) {  				occluder = tile_set->autotile_get_light_occluder(c.id, Vector2(c.autotile_coord_x, c.autotile_coord_y)); -				occluder_ofs = tile_set->tile_get_occluder_offset(c.id);  			} else {  				occluder = tile_set->tile_get_light_occluder(c.id); -				occluder_ofs = Vector2();  			}  			if (occluder.is_valid()) { - +				Vector2 occluder_ofs = tile_set->tile_get_occluder_offset(c.id);  				Transform2D xform;  				xform.set_origin(offset.floor() + q.pos);  				_fix_cell_transform(xform, c, occluder_ofs + center_ofs, s); 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"))); |