Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-08-21 20:45:59 +0300
committerAntonioya <blendergit@gmail.com>2018-08-21 20:46:29 +0300
commit7fda7fb750a9436f4c9a69375113b79502ea6dc1 (patch)
tree4f84c57a17feb9d1eec2d8413381c5454ba37845 /source/blender/blenkernel/intern/gpencil_modifier.c
parent596c3368f4b09bdeec46e7b44abfc8bcb7ba8fcf (diff)
GP: Force Fill triangulation data recalc
Add a general parameter to force the recalc of the triangulation data because some modifiers could change the geometry and the filling triangles would not be right. Now, the parameter is visible in UI panel because this option reduces FPS, but maybe in the future we can keep always ON and remove the parameter.
Diffstat (limited to 'source/blender/blenkernel/intern/gpencil_modifier.c')
-rw-r--r--source/blender/blenkernel/intern/gpencil_modifier.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index d1c455f64e1..512f6f73927 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -403,6 +403,19 @@ void BKE_gpencil_stroke_modifiers(Depsgraph *depsgraph, Object *ob, bGPDlayer *g
if (mti && mti->deformStroke) {
mti->deformStroke(md, depsgraph, ob, gpl, gps);
+
+ /* some modifiers could require a recalc of fill triangulation data */
+ if (gpd->flag & GP_DATA_STROKE_FORCE_RECALC) {
+ if (ELEM(md->type,
+ eGpencilModifierType_Hook,
+ eGpencilModifierType_Lattice,
+ eGpencilModifierType_Noise,
+ eGpencilModifierType_Offset,
+ eGpencilModifierType_Smooth)) {
+
+ gps->flag |= GP_STROKE_RECALC_CACHES;
+ }
+ }
}
}
}