diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-09-04 16:36:02 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-09-04 16:36:02 +0300 |
commit | 97871e16ff45393e964d4882b99a45e18cdc22ab (patch) | |
tree | 0e110d68f6427a05c0366e575c1ab628c6867378 /source/blender/editors/gpencil | |
parent | 767916eefc620fc4f864bfd63633e35af00d9366 (diff) |
GPencil: New option to set steps in Interpolate Sequence
Sometimes interpolate all frames is not convenient and it's better, for example, interpolate in twos.
The new parameter allows to define the number of frame for each step, by default is set to 1 as before.
{F8812621}
This is a request of animators to improve interpolate tools.
Reviewed By: mendio
Maniphest Tasks: T80190
Differential Revision: https://developer.blender.org/D8723
239b0b
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_interpolate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c index 3a7029b1288..380dfd1a7a2 100644 --- a/source/blender/editors/gpencil/gpencil_interpolate.c +++ b/source/blender/editors/gpencil/gpencil_interpolate.c @@ -949,6 +949,7 @@ static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op) GP_Interpolate_Settings *ipo_settings = &ts->gp_interpolate; eGP_Interpolate_SettingsFlag flag = ipo_settings->flag; + const int step = ipo_settings->step; /* cannot interpolate if not between 2 frames */ if (ELEM(NULL, actframe, actframe->next)) { @@ -990,7 +991,7 @@ static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op) nextFrame = gpl->actframe->next; /* Loop over intermediary frames and create the interpolation */ - for (cframe = prevFrame->framenum + 1; cframe < nextFrame->framenum; cframe++) { + for (cframe = prevFrame->framenum + step; cframe < nextFrame->framenum; cframe += step) { bGPDframe *interFrame = NULL; float factor; |