Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-11-12 01:56:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-12 01:59:16 +0300
commitfb70ee0bb5b21ed6dc03d1de6ef138da58113ffe (patch)
treef875903c87699880af52ffcc755e7d4e0bf02684 /source/blender/editors/gpencil/gpencil_fill.c
parent9c3e324a0d6cb28c9db58f644838032577b41764 (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.c9
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;