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_ops.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_ops.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c index 5ea8c0b783f..a199f943a8d 100644 --- a/source/blender/editors/gpencil/gpencil_ops.c +++ b/source/blender/editors/gpencil/gpencil_ops.c @@ -37,6 +37,7 @@ #include "BKE_context.h" #include "BKE_brush.h" #include "BKE_gpencil.h" +#include "BKE_paint.h" #include "DNA_brush_types.h" #include "DNA_gpencil_types.h" @@ -88,7 +89,7 @@ static bool gp_stroke_paintmode_poll_with_tool(bContext *C, const char gpencil_t /* TODO: limit this to mode, but review 2D editors */ bGPdata *gpd = CTX_data_gpencil_data(C); ToolSettings *ts = CTX_data_tool_settings(C); - Brush *brush = BKE_brush_getactive_gpencil(ts); + Brush *brush = BKE_paint_brush(&ts->gp_paint->paint); return ((gpd) && (gpd->flag & GP_DATA_STROKE_PAINTMODE) && (brush && brush->gpencil_settings) && WM_toolsystem_active_tool_is_brush(C) && |