From 009dbc2bc9fbd45f974b46835679fefae7b42561 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Tue, 9 Apr 2019 20:12:21 +0200 Subject: Fix T63427: Annotations don'twork with 2.79 settings The problem was the colors were not converted and the annotation flag was not enabled. Note: For Scene data (View3D) there is a convert operator. --- source/blender/blenkernel/intern/gpencil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 7109764faab..c204a8128c1 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -1069,7 +1069,7 @@ Material *BKE_gpencil_object_material_new(Main *bmain, Object *ob, const char *n /* Returns the material for a brush with respect to its pinned state. */ Material *BKE_gpencil_object_material_get_from_brush(Object *ob, Brush *brush) { - if (brush->gpencil_settings->flag & GP_BRUSH_MATERIAL_PINNED) { + if ((brush) && (brush->gpencil_settings->flag & GP_BRUSH_MATERIAL_PINNED)) { Material *ma = BKE_gpencil_brush_material_get(brush); return ma; } @@ -1081,7 +1081,7 @@ Material *BKE_gpencil_object_material_get_from_brush(Object *ob, Brush *brush) /* Returns the material index for a brush with respect to its pinned state. */ int BKE_gpencil_object_material_get_index_from_brush(Object *ob, Brush *brush) { - if (brush->gpencil_settings->flag & GP_BRUSH_MATERIAL_PINNED) { + if ((brush) && (brush->gpencil_settings->flag & GP_BRUSH_MATERIAL_PINNED)) { return BKE_gpencil_object_material_get_index(ob, brush->gpencil_settings->material); } else { -- cgit v1.2.3