[Bf-blender-cvs] [3b4afd5ca13] greasepencil-object: GP Build Mod Fixes
Joshua Leung
noreply at git.blender.org
Thu Nov 23 15:33:07 CET 2017
Commit: 3b4afd5ca13f3377ea08e654d7d5358b6817ce8b
Author: Joshua Leung
Date: Fri Nov 24 02:35:57 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rB3b4afd5ca13f3377ea08e654d7d5358b6817ce8b
GP Build Mod Fixes
* Sequential mode now works - Accidentally removed the important tallying
step when cleaning up the code earlier
* Typo - Was looking for "direction" values in the wrong field
===================================================================
M source/blender/modifiers/intern/MOD_gpencilbuild.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_gpencilbuild.c b/source/blender/modifiers/intern/MOD_gpencilbuild.c
index 5313d147fa5..48fbdb78f66 100644
--- a/source/blender/modifiers/intern/MOD_gpencilbuild.c
+++ b/source/blender/modifiers/intern/MOD_gpencilbuild.c
@@ -208,6 +208,8 @@ static void build_sequential(GpencilBuildModifierData *mmd, bGPDlayer *gpl, bGPD
cell->gps = gps;
cell->totpoints = gps->totpoints;
+
+ totpoints += cell->totpoints;
}
/* 1.2) Second pass - Compute the overall indices for points */
@@ -297,7 +299,7 @@ static void build_concurrent(GpencilBuildModifierData *mmd, bGPDlayer *gpl, bGPD
bGPDstroke *gps, *gps_next;
int max_points = 0;
- const bool reverse = (mmd->mode != GP_BUILD_DIRECTION_GROW);
+ const bool reverse = (mmd->direction != GP_BUILD_DIRECTION_GROW);
/* 1) Determine the longest stroke, to figure out when short strokes should start */
/* FIXME: A *really* long stroke here could dwarf everything else, causing bad timings */
@@ -399,7 +401,7 @@ static void generateStrokes(ModifierData *md, const EvaluationContext *eval_ctx,
int modifier_index)
{
GpencilBuildModifierData *mmd = (GpencilBuildModifierData *)md;
- const bool reverse = (mmd->mode != GP_BUILD_DIRECTION_GROW);
+ const bool reverse = (mmd->direction != GP_BUILD_DIRECTION_GROW);
const float ctime = eval_ctx->ctime;
printf("Build Modifier - %f\n", ctime);
More information about the Bf-blender-cvs
mailing list