[Bf-blender-cvs] [1115a3eef55] greasepencil-object: Enable default material by brush

Antonio Vazquez noreply at git.blender.org
Sun Apr 29 11:03:08 CEST 2018


Commit: 1115a3eef5521ad3c124897a530e01d576496058
Author: Antonio Vazquez
Date:   Sun Apr 29 11:02:55 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB1115a3eef5521ad3c124897a530e01d576496058

Enable default material by brush

This is an essential feature for pipeline.

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

M	source/blender/blenkernel/intern/gpencil.c
M	source/blender/editors/gpencil/gpencil_paint.c

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

diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index e9c9930224e..6e764575842 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -1046,7 +1046,7 @@ Material *BKE_gpencil_get_color_from_brush(Brush *brush)
 	Material *mat = NULL;
 		
 	if ((brush != NULL) && (brush->material != NULL)) {
-		brush->material;
+		mat = brush->material;
 	}
 
 	return mat;
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 9c30489fbf3..96ea192d30d 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1563,7 +1563,7 @@ static void gp_init_colors(tGPsdata *p)
 	Material *mat = NULL;
 	GpencilColorData *gpcolor = NULL;
 	
-	/* if the brush has a palette and color defined, use these and not current defaults */
+	/* if the brush has a material defined, use this one and not current defaults */
 	mat = BKE_gpencil_get_color_from_brush(brush);
 
 	/* if no brush defaults, get color info



More information about the Bf-blender-cvs mailing list