diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-11-11 14:18:24 -0600 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-11-11 14:18:24 -0600 |
commit | 93815e7e9767058ec5bf54c2bae442bbfcfc074e (patch) | |
tree | cc0e8484c1623678797fb58007fdc6005deb697b /editor/plugins/animation_player_editor_plugin.cpp | |
parent | e5b77b184f3547289256d40f04b8bc6a7efdc055 (diff) | |
parent | 64d04c375c7a0ec73774d2b977eb30b064a38051 (diff) | |
download | redot-engine-93815e7e9767058ec5bf54c2bae442bbfcfc074e.tar.gz |
Merge pull request #99013 from TokageItLab/fps-compat-toggle
Add FPS compatible option in second mode of the animation editor snapping
Diffstat (limited to 'editor/plugins/animation_player_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index d089aedc63..4edd021b4d 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -580,8 +580,10 @@ float AnimationPlayerEditor::_get_editor_step() const { const Ref<Animation> anim = player->get_animation(current); ERR_FAIL_COND_V(anim.is_null(), 0.0); + float step = track_editor->get_snap_unit(); + // Use more precise snapping when holding Shift - return Input::get_singleton()->is_key_pressed(Key::SHIFT) ? anim->get_step() * 0.25 : anim->get_step(); + return Input::get_singleton()->is_key_pressed(Key::SHIFT) ? step * 0.25 : step; } void AnimationPlayerEditor::_animation_name_edited() { |