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/drawgpencil.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/drawgpencil.c')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index e160c7e05a1..03589bb69ae 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -1679,12 +1679,11 @@ static void gp_draw_data_all( int cfra, int dflag, const char UNUSED(spacetype)) { bGPdata *gpd_source = NULL; - ToolSettings *ts = NULL; Brush *brush = NULL; Object *ob = OBACT(view_layer); if (scene) { - ts = scene->toolsettings; - brush = BKE_brush_getactive_gpencil(ts); + ToolSettings *ts = scene->toolsettings; + brush = BKE_paint_brush(&ts->gp_paint->paint); if (gpd_source) { if (brush != NULL) { @@ -1827,7 +1826,7 @@ void ED_gpencil_draw_view3d_object(wmWindowManager *wm, Scene *scene, Depsgraph /* draw it! */ ToolSettings *ts = scene->toolsettings; - Brush *brush = BKE_brush_getactive_gpencil(ts); + Brush *brush = BKE_paint_brush(&ts->gp_paint->paint); if (brush != NULL) { gp_draw_data(rv3d, brush, 1.0f, ob, gpd, offsx, offsy, winx, winy, CFRA, dflag); |