From e104735eeb80846ade83bbc3ac9a998bf65ff03e Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 29 Nov 2024 15:40:51 +0100 Subject: [PATCH] Fix: Grease Pencil: issues with the transform keyframes system Oversight in 09d2108bf502 For one, numinput for keyframes would be broken unless the mouse is moved first. Secondly, redo would also be broken (using the `Adjust Last Operation` panel or the `Repeat Last` operator). Above commit did a check for `TRANS_RUNNING` before calling `grease_pencil_layer_update_trans_data`. This isnt set in any of the above scenarios (it only gets set once the moues moves). This PR removes `TRANS_RUNNING` check to have proper calls to `grease_pencil_layer_update_trans_data`. It has one downside: you now get a `grease_pencil_layer_update_trans_data` as soon as you hit `G`. So it does remove_frame / add_frame unnecessarily (since we are still on the same frame), but only once, sees harmless in comparison to the two regression it fixes. Fixes #131092 Fixes #130793 Pull Request: https://projects.blender.org/blender/blender/pulls/131143 --- source/blender/editors/transform/transform_convert_action.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/transform/transform_convert_action.cc b/source/blender/editors/transform/transform_convert_action.cc index 3fc2f08e9df..ac092d2bff7 100644 --- a/source/blender/editors/transform/transform_convert_action.cc +++ b/source/blender/editors/transform/transform_convert_action.cc @@ -1034,7 +1034,7 @@ static void recalcData_actedit(TransInfo *t) transform_convert_flush_handle2D(td, td2d, 0.0f); - if ((t->state == TRANS_RUNNING) && ((td->flag & TD_GREASE_PENCIL_FRAME) != 0)) { + if ((td->flag & TD_GREASE_PENCIL_FRAME) != 0) { grease_pencil_layer_update_trans_data( *static_cast(td->extra), round_fl_to_int(td->ival),