[Bf-blender-cvs] [9de639b0d5b] greasepencil-object: Cleanup: Remove unused flag GP_STROKE_RECALC_COLOR

Antonio Vazquez noreply at git.blender.org
Fri May 25 12:08:28 CEST 2018


Commit: 9de639b0d5bd76a6053899f3b44b3602886b1664
Author: Antonio Vazquez
Date:   Fri May 25 12:08:21 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB9de639b0d5bd76a6053899f3b44b3602886b1664

Cleanup: Remove unused flag GP_STROKE_RECALC_COLOR

This flag was used when the color name was the link to the palette color, but now with materials this flag is not required.

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

M	source/blender/blenloader/intern/versioning_270.c
M	source/blender/makesdna/DNA_gpencil_types.h
M	source/blender/makesrna/intern/rna_gpencil.c

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

diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index b4d23a0a9d7..1b73eda877f 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1389,7 +1389,6 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
 								for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
 									/* set stroke to palette and force recalculation */
 									BLI_strncpy(gps->colorname, gpl->info, sizeof(gps->colorname));
-									gps->flag |= GP_STROKE_RECALC_COLOR;
 									gps->thickness = gpl->thickness;
 									
 									/* set alpha strength to 1 */
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 28e1ec6ad62..8e7663982ad 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -188,8 +188,6 @@ typedef enum eGPDstroke_Flag {
 	GP_STROKE_SELECT		= (1 << 3),
 	/* Recalculate triangulation for high quality fill (when true, force a new recalc) */
 	GP_STROKE_RECALC_CACHES = (1 << 4),
-	/* Recalculate the color pointer using the name as index (true force a new recalc) */
-	GP_STROKE_RECALC_COLOR = (1 << 5),
 	/* 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 */
@@ -272,7 +270,6 @@ typedef struct bGPDlayer {
 	bGPDlayer_runtime runtime;
 } bGPDlayer;
 
-
 /* bGPDlayer->flag */
 typedef enum eGPDlayer_Flag {
 	/* don't display layer */
@@ -322,6 +319,7 @@ typedef struct bGPdata_runtime {
 	/* Runtime Only - Drawing Manager cache */
 	struct GHash *batch_cache_data;
 } bGPdata_runtime;
+
 typedef struct bGPdata {
 	ID id;					/* Grease Pencil data is a datablock */
 	struct AnimData *adt;   /* animation data - for animating draw settings */
@@ -370,7 +368,6 @@ typedef struct bGPdata {
 	char pad2[6];
 } bGPdata;
 
-
 /* bGPdata->flag */
 /* NOTE: A few flags have been deprecated since early 2.5,
  *       since they have been made redundant by interaction
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 745c0d8f4bb..e8bbc4e7fcb 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -467,7 +467,6 @@ static void rna_GPencil_stroke_point_pop(bGPDstroke *stroke, ReportList *reports
 static bGPDstroke *rna_GPencil_stroke_new(bGPDframe *frame)
 {
 	bGPDstroke *stroke = MEM_callocN(sizeof(bGPDstroke), "gp_stroke");
-	stroke->flag |= GP_STROKE_RECALC_COLOR;
 	BLI_addtail(&frame->strokes, stroke);
 
 	return stroke;



More information about the Bf-blender-cvs mailing list