[Bf-blender-cvs] [25579ab43aa] greasepencil-object: Copy color name to color picked temp data

Antonio Vazquez noreply at git.blender.org
Sat Jan 13 16:26:46 CET 2018


Commit: 25579ab43aaf45ef542ba346498ad3b69bd2c639
Author: Antonio Vazquez
Date:   Sat Jan 13 16:03:11 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB25579ab43aaf45ef542ba346498ad3b69bd2c639

Copy color name to color picked temp data

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

M	source/blender/editors/gpencil/gpencil_colorpick.c
M	source/blender/editors/include/ED_gpencil.h

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

diff --git a/source/blender/editors/gpencil/gpencil_colorpick.c b/source/blender/editors/gpencil/gpencil_colorpick.c
index ff2f197b388..e6b9da6ed5d 100644
--- a/source/blender/editors/gpencil/gpencil_colorpick.c
+++ b/source/blender/editors/gpencil/gpencil_colorpick.c
@@ -334,6 +334,7 @@ static tGPDpick *gp_session_init_colorpick(bContext *C, wmOperator *op)
 			}
 		}
 
+		BLI_strncpy(tcolor->name, palcol->info, sizeof(tcolor->name));
 		tcolor->index = idx;
 		copy_v4_v4(tcolor->rgba, palcol->rgb);
 		if (palcol->fill[3] > 0.0f) {
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 7791b68a420..70555c69728 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -193,6 +193,7 @@ typedef struct tGPDfill {
 
 /* Temporary color picker operation data */
 typedef struct tGPDpickColor {
+	char name[64];  /* color name. Must be unique. */
 	rcti rect;		/* box position */
 	int index;      /* index of color in palette */
 	float rgba[4];	/* color */



More information about the Bf-blender-cvs mailing list