[Bf-blender-cvs] [c3b9b7b8e4c] greasepencil-object: Fix: Strokes weren't visible while drawing

Joshua Leung noreply at git.blender.org
Wed Oct 4 14:17:03 CEST 2017


Commit: c3b9b7b8e4c130aa773d1440e119e44cd1eb9927
Author: Joshua Leung
Date:   Tue Oct 3 17:19:55 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rBc3b9b7b8e4c130aa773d1440e119e44cd1eb9927

Fix: Strokes weren't visible while drawing

Missed this usage of palettes in previous commit

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

M	source/blender/draw/engines/gpencil/gpencil_engine.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 65ad6aebd6a..0fa34d40230 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -277,8 +277,8 @@ static void GPENCIL_cache_init(void *vedata)
 		if (ob) {
 			gpd = ob->gpd;
 		}
-		Palette *palette = BKE_palette_get_active_from_context(draw_ctx->evil_C);
-		PaletteColor *palcolor = BKE_palette_color_get_active(palette);
+		bGPDpaletteref *palslot = BKE_gpencil_paletteslot_get_active(gpd);
+		PaletteColor *palcolor = BKE_palette_color_get_active((palslot) ? palslot->palette : NULL);
 		if (palcolor) {
 			stl->storage->stroke_style = palcolor->stroke_style;
 			stl->storage->color_type = GPENCIL_COLOR_SOLID;



More information about the Bf-blender-cvs mailing list