diff options
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c index 8ece1a42c1c..88a5a789466 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c @@ -118,6 +118,17 @@ static int remapTime( /* apply frame scale */ cfra *= mmd->frame_scale; + + /* verify not outside range if loop is disabled */ + if ((mmd->flag & GP_TIME_KEEP_LOOP) == 0) { + if (cfra + mmd->offset < sfra) { + return sfra; + } + if (cfra + mmd->offset > efra) { + return efra; + } + } + if (cfra > efra) { cfra = sfra + (cfra - ((cfra / efra) * efra)); } |