Commit: fdc726eb61d15a51d8deddcb6b7b79859ea9950e
Author: Antonioya
Date:   Fri Dec 28 08:48:37 2018 +0100
Branches: master
https://developer.blender.org/rBfdc726eb61d15a51d8deddcb6b7b79859ea9950e

GP: Rename GP_STROKE_RECALC_CACHE to GP_STROKE_RECALC_GEOMETRY

The GP_STROKE_RECALC_CACHE identifier was changed to GP_STROKE_RECALC_GEOMETRY 
because the previous name was confusing and could be confused with the 
recalculation of the Draw Manager cache.

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

M       source/blender/blenkernel/intern/gpencil.c
M       source/blender/blenkernel/intern/gpencil_modifier.c
M       source/blender/blenloader/intern/readfile.c
M       source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
M       source/blender/draw/engines/gpencil/gpencil_draw_utils.c
M       source/blender/editors/gpencil/annotate_paint.c
M       source/blender/editors/gpencil/drawgpencil.c
M       source/blender/editors/gpencil/gpencil_brush.c
M       source/blender/editors/gpencil/gpencil_edit.c
M       source/blender/editors/gpencil/gpencil_fill.c
M       source/blender/editors/gpencil/gpencil_interpolate.c
M       source/blender/editors/gpencil/gpencil_paint.c
M       source/blender/editors/gpencil/gpencil_primitive.c
M       source/blender/editors/gpencil/gpencil_utils.c
M       source/blender/editors/transform/transform_generics.c
M       source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
M       source/blender/makesdna/DNA_gpencil_types.h
M       source/blender/makesrna/intern/rna_gpencil.c

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

diff --git a/source/blender/blenkernel/intern/gpencil.c 
b/source/blender/blenkernel/intern/gpencil.c
index f8dfa82e2a2..d347e10921c 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -476,14 +476,14 @@ bGPDstroke *BKE_gpencil_add_stroke(bGPDframe *gpf, int 
mat_idx, int totpoints, s
        gps->inittime = 0;
 
        /* enable recalculation flag by default */
-       gps->flag = GP_STROKE_RECALC_CACHES | GP_STROKE_3DSPACE;
+       gps->flag = GP_STROKE_RECALC_GEOMETRY | GP_STROKE_3DSPACE;
 
        gps->totpoints = totpoints;
        gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, 
"gp_stroke_points");
 
        /* initialize triangle memory to dummy data */
        gps->triangles = MEM_callocN(sizeof(bGPDtriangle), "GP Stroke 
triangulation");
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
        gps->tot_triangles = 0;
 
        gps->mat_nr = mat_idx;
@@ -532,7 +532,7 @@ bGPDstroke *BKE_gpencil_stroke_duplicate(bGPDstroke 
*gps_src)
         * this data to get recalculated will destroy the data anyway though.
         */
        gps_dst->triangles = MEM_dupallocN(gps_dst->triangles);
-       /* gps_dst->flag |= GP_STROKE_RECALC_CACHES; */
+       /* gps_dst->flag |= GP_STROKE_RECALC_GEOMETRY; */
 
        /* return new stroke */
        return gps_dst;
@@ -1179,7 +1179,7 @@ void BKE_gpencil_transform(bGPdata *gpd, float mat[4][4])
                                }
 
                                /* TODO: Do we need to do this? distortion may 
mean we need to re-triangulate */
-                               gps->flag |= GP_STROKE_RECALC_CACHES;
+                               gps->flag |= GP_STROKE_RECALC_GEOMETRY;
                                gps->tot_triangles = 0;
                        }
                }
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c 
b/source/blender/blenkernel/intern/gpencil_modifier.c
index 534166bf629..6bb47b4685e 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -227,7 +227,7 @@ static void gpencil_rdp_stroke(bGPDstroke *gps, vec2f 
*points2d, float epsilon)
                old_dvert = MEM_dupallocN(gps->dvert);
        }
        /* resize gps */
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
        gps->tot_triangles = 0;
 
        int j = 0;
@@ -302,7 +302,7 @@ void BKE_gpencil_simplify_fixed(bGPDstroke *gps)
        if (gps->dvert != NULL) {
                gps->dvert = MEM_recallocN(gps->dvert, sizeof(*gps->dvert) * 
newtot);
        }
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
        gps->tot_triangles = 0;
 
        int j = 0;
@@ -443,7 +443,7 @@ void BKE_gpencil_stroke_modifiers(Depsgraph *depsgraph, 
Object *ob, bGPDlayer *g
                                                 eGpencilModifierType_Offset))
                                        {
 
-                                               gps->flag |= 
GP_STROKE_RECALC_CACHES;
+                                               gps->flag |= 
GP_STROKE_RECALC_GEOMETRY;
                                        }
                                }
                        }
@@ -743,7 +743,7 @@ void BKE_gpencil_subdivide(bGPDstroke *gps, int level, int 
flag)
                        temp_dverts = MEM_dupallocN(gps->dvert);
                        gps->dvert = MEM_recallocN(gps->dvert, 
sizeof(*gps->dvert) * gps->totpoints);
                }
-               gps->flag |= GP_STROKE_RECALC_CACHES;
+               gps->flag |= GP_STROKE_RECALC_GEOMETRY;
 
                /* move points from last to first to new place */
                i2 = gps->totpoints - 1;
diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index d3721273ce9..98d041a4673 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6597,7 +6597,7 @@ static void direct_link_gpencil(FileData *fd, bGPdata 
*gpd)
                                /* the triangulation is not saved, so need to 
be recalculated */
                                gps->triangles = NULL;
                                gps->tot_triangles = 0;
-                               gps->flag |= GP_STROKE_RECALC_CACHES;
+                               gps->flag |= GP_STROKE_RECALC_GEOMETRY;
                        }
                }
        }
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c 
b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index 0f37e8824ee..d5927ebca9a 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -209,7 +209,7 @@ void DRW_gpencil_get_fill_geom(struct GpencilBatchCacheElem 
*be, Object *ob, bGP
        BLI_assert(gps->totpoints >= 3);
 
        /* Calculate triangles cache for filling area (must be done only after 
changes) */
-       if ((gps->flag & GP_STROKE_RECALC_CACHES) || (gps->tot_triangles == 0) 
|| (gps->triangles == NULL)) {
+       if ((gps->flag & GP_STROKE_RECALC_GEOMETRY) || (gps->tot_triangles == 
0) || (gps->triangles == NULL)) {
                DRW_gpencil_triangulate_stroke_fill(ob, gps);
                ED_gpencil_calc_stroke_uv(ob, gps);
        }
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c 
b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 0dc3870b11a..1275e93744e 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -219,7 +219,7 @@ static void gpencil_calc_stroke_fill_uv(
 static void DRW_gpencil_recalc_geometry_caches(
        Object *ob, bGPDlayer *gpl, MaterialGPencilStyle *gp_style, bGPDstroke 
*gps)
 {
-       if (gps->flag & GP_STROKE_RECALC_CACHES) {
+       if (gps->flag & GP_STROKE_RECALC_GEOMETRY) {
                /* Calculate triangles cache for filling area (must be done 
only after changes) */
                if ((gps->tot_triangles == 0) || (gps->triangles == NULL)) {
                        if ((gps->totpoints > 2) &&
@@ -234,7 +234,7 @@ static void DRW_gpencil_recalc_geometry_caches(
                ED_gpencil_calc_stroke_uv(ob, gps);
 
                /* clear flag */
-               gps->flag &= ~GP_STROKE_RECALC_CACHES;
+               gps->flag &= ~GP_STROKE_RECALC_GEOMETRY;
        }
 }
 
@@ -1118,8 +1118,8 @@ void DRW_gpencil_triangulate_stroke_fill(Object *ob, 
bGPDstroke *gps)
        }
 
        /* disable recalculation flag */
-       if (gps->flag & GP_STROKE_RECALC_CACHES) {
-               gps->flag &= ~GP_STROKE_RECALC_CACHES;
+       if (gps->flag & GP_STROKE_RECALC_GEOMETRY) {
+               gps->flag &= ~GP_STROKE_RECALC_GEOMETRY;
        }
 
        /* clear memory */
diff --git a/source/blender/editors/gpencil/annotate_paint.c 
b/source/blender/editors/gpencil/annotate_paint.c
index f03141c3513..a868e98e3dd 100644
--- a/source/blender/editors/gpencil/annotate_paint.c
+++ b/source/blender/editors/gpencil/annotate_paint.c
@@ -447,7 +447,7 @@ static short gp_stroke_addpoint(
                        pts->time = pt->time;
 
                        /* force fill recalc */
-                       gps->flag |= GP_STROKE_RECALC_CACHES;
+                       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
                }
 
                /* increment counters */
@@ -586,7 +586,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
        gps->inittime = p->inittime;
 
        /* enable recalculation flag by default (only used if hq fill) */
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
 
        /* allocate enough memory for a continuous array for storage points */
        gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, 
"gp_stroke_points");
diff --git a/source/blender/editors/gpencil/drawgpencil.c 
b/source/blender/editors/gpencil/drawgpencil.c
index 1ad71f55ba4..5bb2d374c80 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -513,8 +513,8 @@ static void gp_triangulate_stroke_fill(bGPDstroke *gps)
        }
 
        /* disable recalculation flag */
-       if (gps->flag & GP_STROKE_RECALC_CACHES) {
-               gps->flag &= ~GP_STROKE_RECALC_CACHES;
+       if (gps->flag & GP_STROKE_RECALC_GEOMETRY) {
+               gps->flag &= ~GP_STROKE_RECALC_GEOMETRY;
        }
 
        /* clear memory */
@@ -591,7 +591,7 @@ static void gp_draw_stroke_fill(
        MaterialGPencilStyle *gp_style = ma->gp_style;
 
        /* Calculate triangles cache for filling area (must be done only after 
changes) */
-       if ((gps->flag & GP_STROKE_RECALC_CACHES) || (gps->tot_triangles == 0) 
|| (gps->triangles == NULL)) {
+       if ((gps->flag & GP_STROKE_RECALC_GEOMETRY) || (gps->tot_triangles == 
0) || (gps->triangles == NULL)) {
                gp_triangulate_stroke_fill(gps);
        }
        BLI_assert(gps->tot_triangles >= 1);
diff --git a/source/blender/editors/gpencil/gpencil_brush.c 
b/source/blender/editors/gpencil/gpencil_brush.c
index 2c2a4510295..95644bd690c 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -319,7 +319,7 @@ static bool gp_brush_smooth_apply(
                BKE_gpencil_smooth_stroke_uv(gps, pt_index, inf);
        }
 
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
 
        return true;
 }
@@ -535,7 +535,7 @@ static void gp_brush_grab_apply_cached(
                /* compute lock axis */
                gpsculpt_compute_lock_axis(gso, pt, save_pt);
        }
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
 }
 
 /* free customdata used for handling this stroke */
@@ -575,7 +575,7 @@ static bool gp_brush_push_apply(
        /* compute lock axis */
        gpsculpt_compute_lock_axis(gso, pt, save_pt);
 
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
 
        /* done */
        return true;
@@ -661,7 +661,7 @@ static bool gp_brush_pinch_apply(
        /* compute lock axis */
        gpsculpt_compute_lock_axis(gso, pt, save_pt);
 
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
 
        /* done */
        return true;
@@ -743,7 +743,7 @@ static bool gp_brush_twist_apply(
                }
        }
 
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
 
        /* done */
        return true;
@@ -867,7 +867,7 @@ static bool gp_brush_randomize_apply(
                CLAMP(pt->uv_rot, -M_PI_2, M_PI_2);
        }
 
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
 
        /* done */
        return true;
@@ -1609,7 +1609,7 @@ static bool gpsculpt_brush_do_frame(
                }
                /* Triangulation must be calculated if changed */
                if (changed) {
-                       gps->flag |= GP_STROKE_RECALC_CACHES;
+                       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
                        gps->tot_triangles = 0;
                }
        }
diff --git a/source/blender/editors/gpencil/gpencil_edit.c 
b/source/blender/editors/gpencil/gpencil_edit.c
index b61ea617b15..7df626ad801 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -631,7 +631,7 @@ static void gp_duplicate_points(const bGPDstroke *gps, 
ListBase *new_strokes, co
 
                                /* initialize triangle memory - will be 
calculated on next redraw */
                                gpsd->triangles = NULL;
-                               gpsd->flag |= GP_STROKE_RECALC_CACHES;
+                               gpsd->flag |= GP_STROKE_RECALC_GEOMETRY;
                                gpsd->tot_triangles = 0;
 
                                /* now, make a new points 

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to