diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-12 01:56:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-12 01:59:16 +0300 |
commit | fb70ee0bb5b21ed6dc03d1de6ef138da58113ffe (patch) | |
tree | f875903c87699880af52ffcc755e7d4e0bf02684 /source/blender/editors/gpencil/gpencil_fill.c | |
parent | 9c3e324a0d6cb28c9db58f644838032577b41764 (diff) |
Cleanup: minor gpencil changes
- Replace BKE_brush_getactive_gpencil -> BKE_paint_brush
(no need for per-paint-type brush access).
- Rename TOT_GP_EDITBRUSH_TYPES -> GP_EDITBRUSH_TYPE_MAX
(avoid sharing prefix w/ unrelated constants).
- Rename instances of `GP_EditBrush_Data` to 'gp_brush'
(`Brush` is typically called 'brush').
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_fill.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 9b6a36ce8af..99a6710ea4d 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -813,11 +813,10 @@ static void gpencil_points_from_stack(tGPDfill *tgpf) /* create a grease pencil stroke using points in buffer */ static void gpencil_stroke_from_buffer(tGPDfill *tgpf) { - ToolSettings *ts = tgpf->scene->toolsettings; - int cfra_eval = (int)DEG_get_ctime(tgpf->depsgraph); + const int cfra_eval = (int)DEG_get_ctime(tgpf->depsgraph); - Brush *brush; - brush = BKE_brush_getactive_gpencil(ts); + ToolSettings *ts = tgpf->scene->toolsettings; + Brush *brush = BKE_paint_brush(&ts->gp_paint->paint); if (brush == NULL) { return; } @@ -1026,7 +1025,7 @@ static tGPDfill *gp_session_init_fill(bContext *C, wmOperator *UNUSED(op)) tgpf->depth_arr = NULL; /* save filling parameters */ - Brush *brush = BKE_brush_getactive_gpencil(ts); + Brush *brush = BKE_paint_brush(&ts->gp_paint->paint); tgpf->flag = brush->gpencil_settings->flag; tgpf->fill_leak = brush->gpencil_settings->fill_leak; tgpf->fill_threshold = brush->gpencil_settings->fill_threshold; |