[Bf-blender-cvs] [2ca20b8282e] greasepencil-object: GPencil: Fix Build modifier error in end frame calculation

Antonio Vazquez noreply at git.blender.org
Fri Mar 6 11:57:39 CET 2020


Commit: 2ca20b8282eeb1dfe40a8c01993b87becadb8acc
Author: Antonio Vazquez
Date:   Fri Mar 6 10:16:13 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rB2ca20b8282eeb1dfe40a8c01993b87becadb8acc

GPencil: Fix Build modifier error in end frame calculation

===================================================================

M	source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c

===================================================================

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
index 8fce57f3368..7e89d8e2d6f 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
@@ -398,8 +398,10 @@ static void build_concurrent(BuildGpencilModifierData *mmd, bGPDframe *gpf, floa
 }
 
 /* --------------------------------------------- */
-static void generate_geometry(
-    GpencilModifierData *md, Depsgraph *depsgraph, bGPDlayer *gpl, bGPDframe *gpf)
+static void generate_geometry(GpencilModifierData *md,
+                              Depsgraph *depsgraph,
+                              bGPDlayer *gpl,
+                              bGPDframe *gpf)
 {
   BuildGpencilModifierData *mmd = (BuildGpencilModifierData *)md;
   const bool reverse = (mmd->transition != GP_BUILD_TRANSITION_GROW);
@@ -451,7 +453,7 @@ static void generate_geometry(
    * By default, the upper bound is given by the "maximum length" setting
    */
   float start_frame = gpf->framenum + mmd->start_delay;
-  float end_frame = gpf->framenum + mmd->length;
+  float end_frame = start_frame + mmd->length;
 
   if (gpf->next) {
     /* Use the next frame or upper bound as end frame, whichever is lower/closer */



More information about the Bf-blender-cvs mailing list