Merge pull request #99013 from TokageItLab/fps-compat-toggle

Add FPS compatible option in second mode of the animation editor snapping
This commit is contained in:
Thaddeus Crews 2024-11-11 14:18:24 -06:00
commit 93815e7e97
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84
4 changed files with 66 additions and 10 deletions

View file

@ -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() {