diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-05 08:18:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-05 08:18:43 +0300 |
commit | 1b928c2d9a4b4b4a57046176912e0ae6d77f9a1d (patch) | |
tree | c19777cbf0b7108f7440a62eea228355488d29b9 /source/blender/editors/gpencil/gpencil_edit.c | |
parent | 56917bcf731c6d3568d920a6ccbec524c25aaea1 (diff) |
Paint: add tool offset & mode to runtime data
It was getting too impractical to call BKE_paint_brush_tool_info
which needed to lookup the scene pointers.
Now each store tool offset and brush mode in 'Paint.runtime'
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_edit.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index fc50fa7359f..1d29761bb74 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -282,7 +282,6 @@ static int gpencil_paintmode_toggle_exec(bContext *C, wmOperator *op) struct wmMsgBus *mbus = CTX_wm_message_bus(C); Main *bmain = CTX_data_main(C); - Scene *scene = CTX_data_scene(C); bGPdata *gpd = ED_gpencil_data_get_active(C); ToolSettings *ts = CTX_data_tool_settings(C); @@ -325,7 +324,7 @@ static int gpencil_paintmode_toggle_exec(bContext *C, wmOperator *op) if (paint->brush == NULL) { BKE_brush_gpencil_presets(C); } - BKE_paint_toolslots_brush_validate(bmain, scene, &ts->gp_paint->paint); + BKE_paint_toolslots_brush_validate(bmain, &ts->gp_paint->paint); } /* setup other modes */ |