diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-05 07:31:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-05 07:31:25 +0300 |
commit | 8b31f6fb2169e7163767e382adbef13587305aca (patch) | |
tree | 23609feb5da08a39f8009eb4390f69e6205fc2b1 /source/blender/editors/gpencil/gpencil_primitive.c | |
parent | 8fcc04edce53c5b3b01bf392e1667878ebcce0ef (diff) |
Paint: add BKE_paint_ensure to initialize toolsettings
Each mode had its own logic for initializing paint structs,
move to a single function.
Also remove "BKE_brush_get_gpencil_paint", entering grease pencil
mode is responsible for ensuring the data is created.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_primitive.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_primitive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index 338fb7f5c6a..5f50c2f7a82 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -144,7 +144,7 @@ static void gp_primitive_set_initdata(bContext *C, tGPDprimitive *tgpi) Brush *brush; /* if brush doesn't exist, create a new one */ - Paint *paint = BKE_brush_get_gpencil_paint(ts); + Paint *paint = &ts->gp_paint->paint; /* if not exist, create a new one */ if (paint->brush == NULL) { /* create new brushes */ |