[Bf-blender-cvs] [3397007cb61] greasepencil-object: Fix wrong Material name

Antonio Vazquez noreply at git.blender.org
Mon Apr 30 11:27:20 CEST 2018


Commit: 3397007cb61db64711e55cc470f37267d6b869c7
Author: Antonio Vazquez
Date:   Mon Apr 30 11:27:12 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB3397007cb61db64711e55cc470f37267d6b869c7

Fix wrong Material name

The name was using the ID type.

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

M	source/blender/editors/gpencil/gpencil_colorpick.c

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

diff --git a/source/blender/editors/gpencil/gpencil_colorpick.c b/source/blender/editors/gpencil/gpencil_colorpick.c
index fd6864a758f..e8196c242b0 100644
--- a/source/blender/editors/gpencil/gpencil_colorpick.c
+++ b/source/blender/editors/gpencil/gpencil_colorpick.c
@@ -392,7 +392,7 @@ static tGPDpick *gpencil_colorpick_init(bContext *C, wmOperator *op, const wmEve
 		
 		tcolor->index = idx;
 
-		BLI_strncpy(tcolor->name, tmp->id.name, sizeof(tcolor->name));
+		BLI_strncpy(tcolor->name, tmp->id.name + 2, sizeof(tcolor->name));
 		copy_v4_v4(tcolor->rgba, gpcolor->rgb);
 		copy_v4_v4(tcolor->fill, gpcolor->fill);
 		tcolor->fillmode = (gpcolor->fill[3] > 0.0f);



More information about the Bf-blender-cvs mailing list