diff options
author | Antonioya <blendergit@gmail.com> | 2019-04-09 21:12:21 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-04-09 21:12:21 +0300 |
commit | 009dbc2bc9fbd45f974b46835679fefae7b42561 (patch) | |
tree | 2e5598abbb7fa72685d5234b2951b6416d000d28 /source/blender/blenkernel | |
parent | 59955a297ed955d022f3c76374091a824cfe2e6c (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |