GP: Rename GP_STROKE_RECALC_CACHE to GP_STROKE_RECALC_GEOMETRY
authorAntonioya <blendergit@gmail.com>
Fri, 28 Dec 2018 07:48:37 +0000 (08:48 +0100)
committerAntonioya <blendergit@gmail.com>
Fri, 28 Dec 2018 07:48:37 +0000 (08:48 +0100)
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.

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

index f8dfa82e2a25a2067827e2bde93460c078dc6b7f..d347e10921c7b2f261035d54cd46cf291ef3b015 100644 (file)
@@ -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;
                        }
                }
index 534166bf629c9297dfb756aef42f84e4f685b748..6bb47b4685e179a9b159a3a95e8b0598d97cf394 100644 (file)
@@ -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;
index d3721273ce92d2c6caa1fe1c86c08b7d95a4a38c..98d041a46739c4f7492309948362413c5a85388e 100644 (file)
@@ -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;
                        }
                }
        }
index 0f37e8824ee513f39ae0a71472ab14cbf3798a74..d5927ebca9ac736781a94fd450a175e4c296b2d6 100644 (file)
@@ -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);
        }
index 0dc3870b11a30c1bab078b66807b0bc3fcc44a41..1275e93744ebcdc86a04c836058f90417626dbab 100644 (file)
@@ -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 */
index f03141c35131be619a2841fd220ab704b4560ce8..a868e98e3dda07b7c81ca4c1dd4888b862edc87d 100644 (file)
@@ -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");
index 1ad71f55ba4e78791a668787de8e865b59702f02..5bb2d374c804ac1af13fcc6ca87e775eab44e850 100644 (file)
@@ -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);
index 2c2a45102951e0b8ae6d011d124926fbc39ad912..95644bd690ce42e19435d5b0460c1425d1a62d4a 100644 (file)
@@ -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;
                }
        }
index b61ea617b15dfd885b46aa90d680b9ba69a33e40..7df626ad8018cd4fc08fd0e58f54d7f9e231a5b6 100644 (file)
@@ -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 array, and copy of the relevant parts */
@@ -713,7 +713,7 @@ static int gp_duplicate_exec(bContext *C, wmOperator *op)
                                        }
 
                                        /* triangle information - will be calculated on next redraw */
-                                       gpsd->flag |= GP_STROKE_RECALC_CACHES;
+                                       gpsd->flag |= GP_STROKE_RECALC_GEOMETRY;
                                        gpsd->triangles = NULL;
 
                                        /* add to temp buffer */
@@ -936,7 +936,7 @@ static int gp_strokes_copy_exec(bContext *C, wmOperator *op)
                                        }
 
                                        /* triangles cache - will be recalculated on next redraw */
-                                       gpsd->flag |= GP_STROKE_RECALC_CACHES;
+                                       gpsd->flag |= GP_STROKE_RECALC_GEOMETRY;
                                        gpsd->tot_triangles = 0;
                                        gpsd->triangles = NULL;
 
@@ -1113,7 +1113,7 @@ static int gp_strokes_paste_exec(bContext *C, wmOperator *op)
                                        new_stroke->dvert = MEM_dupallocN(gps->dvert);
                                        BKE_gpencil_stroke_weights_duplicate(gps, new_stroke);
                                }
-                               new_stroke->flag |= GP_STROKE_RECALC_CACHES;
+                               new_stroke->flag |= GP_STROKE_RECALC_GEOMETRY;
                                new_stroke->triangles = NULL;
 
                                new_stroke->next = new_stroke->prev = NULL;
@@ -1777,7 +1777,7 @@ static int gp_dissolve_selected_points(bContext *C, eGP_DissolveMode mode)
                                                        gps->totpoints = tot;
 
                                                        /* triangles cache needs to be recalculated */
-                                                       gps->flag |= GP_STROKE_RECALC_CACHES;
+                                                       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
                                                        gps->tot_triangles = 0;
 
                                                        /* deselect the stroke, since none of its selected points will still be selected */
@@ -1877,7 +1877,7 @@ void gp_stroke_delete_tagged_points(bGPDframe *gpf, bGPDstroke *gps, bGPDstroke
 
                        /* initialize triangle memory  - to be calculated on next redraw */
                        new_stroke->triangles = NULL;
-                       new_stroke->flag |= GP_STROKE_RECALC_CACHES;
+                       new_stroke->flag |= GP_STROKE_RECALC_GEOMETRY;
                        new_stroke->tot_triangles = 0;
 
                        /* Compute new buffer size (+ 1 needed as the endpoint index is "inclusive") */
@@ -2707,7 +2707,7 @@ static int gp_stroke_join_exec(bContext *C, wmOperator *op)
                                                }
                                                new_stroke->triangles = NULL;
                                                new_stroke->tot_triangles = 0;
-                                               new_stroke->flag |= GP_STROKE_RECALC_CACHES;
+                                               new_stroke->flag |= GP_STROKE_RECALC_GEOMETRY;
 
                                                /* if new, set current color */
                                                if (type == GP_STROKE_JOINCOPY) {
@@ -3124,7 +3124,7 @@ static int gp_stroke_subdivide_exec(bContext *C, wmOperator *op)
                                if (gps->dvert != NULL) {
                                        gps->dvert = MEM_recallocN(gps->dvert, sizeof(*gps->dvert) * gps->totpoints);
                                }
-                               gps->flag |= GP_STROKE_RECALC_CACHES;
+                               gps->flag |= GP_STROKE_RECALC_GEOMETRY;
 
                                /* loop and interpolate */
                                i2 = 0;
@@ -3195,7 +3195,7 @@ static int gp_stroke_subdivide_exec(bContext *C, wmOperator *op)
                        }
 
                        /* triangles cache needs to be recalculated */
-                       gps->flag |= GP_STROKE_RECALC_CACHES;
+                       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
                        gps->tot_triangles = 0;
                }
        }
index e4e71339560d055f62671205c8339af6b856f403..95e52290b69f1c74a4424491fabdf3d6f728b309 100644 (file)
@@ -863,7 +863,7 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf)
        /* initialize triangle memory to dummy data */
        gps->tot_triangles = 0;
        gps->triangles = NULL;
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
 
        /* add stroke to frame */
        if ((ts->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK) || (tgpf->on_back == true)) {
index 06659a69b82d943e01d064ee7d7816224b5b86b2..86a8e3479f3cd8e1dd2ae204ff171aab806d0a89 100644 (file)
@@ -306,7 +306,7 @@ static void gp_interpolate_set_points(bContext *C, tGPDinterpolate *tgpi)
                                        }
                                        new_stroke->totpoints = gps_to->totpoints;
                                        new_stroke->tot_triangles = 0;
-                                       new_stroke->flag |= GP_STROKE_RECALC_CACHES;
+                                       new_stroke->flag |= GP_STROKE_RECALC_GEOMETRY;
                                }
                                /* update points position */
                                gp_interpolate_update_points(gps_from, gps_to, new_stroke, tgpil->factor);
@@ -320,7 +320,7 @@ static void gp_interpolate_set_points(bContext *C, tGPDinterpolate *tgpi)
                                }
                                new_stroke->tot_triangles = 0;
                                new_stroke->triangles = MEM_recallocN(new_stroke->triangles, sizeof(*new_stroke->triangles));
-                               new_stroke->flag |= GP_STROKE_RECALC_CACHES;
+                               new_stroke->flag |= GP_STROKE_RECALC_GEOMETRY;
                        }
 
                        /* add to strokes */
@@ -596,7 +596,7 @@ static int gpencil_interpolate_modal(bContext *C, wmOperator *op, const wmEvent
                                                BKE_gpencil_stroke_weights_duplicate(gps_src, gps_dst);
                                        }
                                        gps_dst->triangles = MEM_dupallocN(gps_src->triangles);
-                                       gps_dst->flag |= GP_STROKE_RECALC_CACHES;
+                                       gps_dst->flag |= GP_STROKE_RECALC_GEOMETRY;
                                        BLI_addtail(&gpf_dst->strokes, gps_dst);
                                }
                        }
@@ -1033,7 +1033,7 @@ static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op)
                                        }
                                        new_stroke->totpoints = gps_to->totpoints;
                                        new_stroke->tot_triangles = 0;
-                                       new_stroke->flag |= GP_STROKE_RECALC_CACHES;
+                                       new_stroke->flag |= GP_STROKE_RECALC_GEOMETRY;
                                }
 
                                /* update points position */
index 6e79afc747e11e2dbb4a15e306a1f6b55dd69a3e..9ec35105afdd0b450089e9352e418d53334ea5c8 100644 (file)
@@ -816,7 +816,7 @@ static short gp_stroke_addpoint(
                        }
 
                        /* force fill recalc */
-                       gps->flag |= GP_STROKE_RECALC_CACHES;
+                       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
                        /* drawing batch cache is dirty now */
                        gp_update_cache(p->gpd);
                }
@@ -895,7 +895,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 */
        const int subdivide = brush->gpencil_settings->draw_subdivide;
@@ -904,7 +904,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
 
        /* 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;
        /* drawing batch cache is dirty now */
        gp_update_cache(p->gpd);
index 0035d679018c8027e4f97140df8a04c097ca424b..6849e876bf55ee43f566245991d365c1b83b948c 100644 (file)
@@ -332,7 +332,7 @@ static void gp_primitive_set_initdata(bContext *C, tGPDprimitive *tgpi)
        gps->inittime = 0.0f;
 
        /* enable recalculation flag by default */
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
        gps->flag &= ~GP_STROKE_SELECT;
        /* the polygon must be closed, so enabled cyclic */
        if (ELEM(tgpi->type, GP_STROKE_BOX, GP_STROKE_CIRCLE)) {
@@ -349,7 +349,7 @@ static void gp_primitive_set_initdata(bContext *C, tGPDprimitive *tgpi)
        /* initialize triangle memory to dummy data */
        gps->tot_triangles = 0;
        gps->triangles = NULL;
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
 
        /* add to strokes */
        BLI_addtail(&tgpi->gpf->strokes, gps);
@@ -975,7 +975,7 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
        }
 
        /* force fill recalc */
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
 
        MEM_SAFE_FREE(depth_arr);
 
@@ -1203,7 +1203,7 @@ static void gpencil_primitive_interaction_end(bContext *C, wmOperator *op, wmWin
        gps = tgpi->gpf->strokes.first;
        if (gps) {
                gps->thickness = tgpi->brush->size;
-               gps->flag |= GP_STROKE_RECALC_CACHES;
+               gps->flag |= GP_STROKE_RECALC_GEOMETRY;
                gps->tot_triangles = 0;
        }
 
index ee0d80b7c2668b09324ecce3187fc1cd0b73d13c..4d6a7b547c647803f404c003e204f60834aa3341 100644 (file)
@@ -997,7 +997,7 @@ void gp_subdivide_stroke(bGPDstroke *gps, const int subdivide)
                if (gps->dvert != NULL) {
                        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;
index 943dedabba2d906a4794afb606dec3644fbcf1df..11931160fca434873fc300d377bbecde7893b129 100644 (file)
@@ -1080,7 +1080,7 @@ static void recalcData_gpencil_strokes(TransInfo *t)
        for (int i = 0; i < tc->data_len; i++, td++) {
                bGPDstroke *gps = td->extra;
                if (gps != NULL) {
-                       gps->flag |= GP_STROKE_RECALC_CACHES;
+                       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
                }
        }
 }
index ba814c8538ac3bb06828add60775412c9ef69a9f..dbf1a67603febd39da31b3ec6879320ed8dd3f0f 100644 (file)
@@ -178,7 +178,7 @@ static void reduce_stroke_points(bGPDstroke *gps, const int num_points, const eB
        gps->totpoints = num_points;
 
        /* mark stroke as needing to have its geometry caches rebuilt */
-       gps->flag |= GP_STROKE_RECALC_CACHES;
+       gps->flag |= GP_STROKE_RECALC_GEOMETRY;
        gps->tot_triangles = 0;
        MEM_SAFE_FREE(gps->triangles);
 }
index 3357c97a8d62c56a0208298c856593e4b5052fa1..567b8687e20f140608501a1fcc7cb8e1b13dac46 100644 (file)
@@ -196,8 +196,8 @@ typedef enum eGPDstroke_Flag {
        GP_STROKE_2DIMAGE               = (1 << 2),
        /* stroke is selected */
        GP_STROKE_SELECT                = (1 << 3),
-       /* Recalculate triangulation for high quality fill (when true, force a new recalc) */
-       GP_STROKE_RECALC_CACHES = (1 << 4),
+       /* Recalculate geometry data (triangulation, UVs, Bound Box,... (when true, force a new recalc) */
+       GP_STROKE_RECALC_GEOMETRY = (1 << 4),
        /* Flag used to indicate that stroke is closed and draw edge between last and first point */
        GP_STROKE_CYCLIC = (1 << 7),
        /* Flag used to indicate that stroke is used for fill close and must use fill color for stroke and no fill area */
index 6cec826dccbb42414845d21e38a2a66f9c9fd266..92d29b4c2c59093d3dfb5a970b88752ef38b715f 100644 (file)
@@ -528,7 +528,7 @@ static void rna_GPencil_stroke_point_add(ID *id, bGPDstroke *stroke, int count,
 
                stroke->totpoints += count;
 
-               stroke->flag |= GP_STROKE_RECALC_CACHES;
+               stroke->flag |= GP_STROKE_RECALC_GEOMETRY;
 
                gpd->flag |= GP_DATA_PYTHON_UPDATED;
                DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
@@ -581,7 +581,7 @@ static void rna_GPencil_stroke_point_pop(ID *id, bGPDstroke *stroke, ReportList
                MEM_freeN(pt_dvert);
        }
 
-       stroke->flag |= GP_STROKE_RECALC_CACHES;
+       stroke->flag |= GP_STROKE_RECALC_GEOMETRY;
 
        gpd->flag |= GP_DATA_PYTHON_UPDATED;
        DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);