From fdc726eb61d15a51d8deddcb6b7b79859ea9950e Mon Sep 17 00:00:00 2001 From: Antonioya Date: Fri, 28 Dec 2018 08:48:37 +0100 Subject: 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. --- source/blender/blenkernel/intern/gpencil.c | 8 ++++---- source/blender/blenkernel/intern/gpencil_modifier.c | 8 ++++---- source/blender/blenloader/intern/readfile.c | 2 +- .../draw/engines/gpencil/gpencil_draw_cache_impl.c | 2 +- .../blender/draw/engines/gpencil/gpencil_draw_utils.c | 8 ++++---- source/blender/editors/gpencil/annotate_paint.c | 4 ++-- source/blender/editors/gpencil/drawgpencil.c | 6 +++--- source/blender/editors/gpencil/gpencil_brush.c | 14 +++++++------- source/blender/editors/gpencil/gpencil_edit.c | 18 +++++++++--------- source/blender/editors/gpencil/gpencil_fill.c | 2 +- source/blender/editors/gpencil/gpencil_interpolate.c | 8 ++++---- source/blender/editors/gpencil/gpencil_paint.c | 6 +++--- source/blender/editors/gpencil/gpencil_primitive.c | 8 ++++---- source/blender/editors/gpencil/gpencil_utils.c | 2 +- source/blender/editors/transform/transform_generics.c | 2 +- .../gpencil_modifiers/intern/MOD_gpencilbuild.c | 2 +- source/blender/makesdna/DNA_gpencil_types.h | 4 ++-- source/blender/makesrna/intern/rna_gpencil.c | 4 ++-- 18 files changed, 54 insertions(+), 54 deletions(-) (limited to 'source/blender') 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 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; } } diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index e4e71339560..95e52290b69 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -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)) { diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c index 06659a69b82..86a8e3479f3 100644 --- a/source/blender/editors/gpencil/gpencil_interpolate.c +++ b/source/blender/editors/gpencil/gpencil_interpolate.c @@ -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 */ diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 6e79afc747e..9ec35105afd 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -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); diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index 0035d679018..6849e876bf5 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -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; } diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index ee0d80b7c26..4d6a7b547c6 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -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; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 943dedabba2..11931160fca 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -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; } } } diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c index ba814c8538a..dbf1a67603f 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c @@ -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); } diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index 3357c97a8d6..567b8687e20 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -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 */ diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 6cec826dccb..92d29b4c2c5 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -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); -- cgit v1.2.3