[Bf-blender-cvs] [807b460a116] blender2.8: GP: Time Offset verify range if loop is disabled
Antonioya
noreply at git.blender.org
Sun Nov 4 13:27:58 CET 2018
Commit: 807b460a11622e75127cabe00c3ff01b1ea6dfcc
Author: Antonioya
Date: Sun Nov 4 13:27:41 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB807b460a11622e75127cabe00c3ff01b1ea6dfcc
GP: Time Offset verify range if loop is disabled
===================================================================
M source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c
===================================================================
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));
}
More information about the Bf-blender-cvs
mailing list