diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-09 10:22:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-09 11:09:13 +0300 |
commit | f55026d46861a3cb0108ad3f7bab8ed0610f660d (patch) | |
tree | 5eef1d0cb4400250eec037f92b8e1147adad96eb /source/blender/editors/gpencil/gpencil_primitive.c | |
parent | eb9237eb20ccec08bce364db5f768b854a5bb440 (diff) |
Cleanup: BKE_gpencil naming
- The ambiguous term 'handle' was used where 'ensure'
is typically used (get or add when missing).
- Rename `current` to `active`, all `current` functions which were
also ensuring.
- Clarify what is being operated on, using `BKE_gpencil_object_*` for
objects, `BKE_gpencil_brush_*` for brushes.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_primitive.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_primitive.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index f6571773706..f92398520fa 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -140,7 +140,7 @@ static void gp_init_colors(tGPDprimitive *p) MaterialGPencilStyle *gp_style = NULL; /* use brush material */ - p->mat = BKE_gpencil_current_input_brush_material(p->bmain, p->ob, brush); + p->mat = BKE_gpencil_object_material_ensure_from_active_input_brush(p->bmain, p->ob, brush); /* assign color information to temp data */ gp_style = p->mat->gp_style; @@ -331,7 +331,7 @@ static void gp_primitive_set_initdata(bContext *C, tGPDprimitive *tgpi) gps->flag |= GP_STROKE_3DSPACE; - gps->mat_nr = BKE_gpencil_get_material_index(tgpi->ob, tgpi->mat); + gps->mat_nr = BKE_gpencil_object_material_get_index(tgpi->ob, tgpi->mat); /* allocate memory for storage points, but keep empty */ gps->totpoints = 0; @@ -1111,7 +1111,7 @@ static void gpencil_primitive_init(bContext *C, wmOperator *op) tgpi->gpd->runtime.tot_cp_points = 0; /* getcolor info */ - tgpi->mat = BKE_gpencil_current_input_toolsettings_material(bmain, tgpi->ob, ts); + tgpi->mat = BKE_gpencil_object_material_ensure_from_active_input_toolsettings(bmain, tgpi->ob, ts); /* set parameters */ tgpi->type = RNA_enum_get(op->ptr, "type"); |