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>2019-04-09 10:22:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-09 11:09:13 +0300
commitf55026d46861a3cb0108ad3f7bab8ed0610f660d (patch)
tree5eef1d0cb4400250eec037f92b8e1147adad96eb /source/blender/editors/gpencil/gpencil_edit.c
parenteb9237eb20ccec08bce364db5f768b854a5bb440 (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_edit.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 99d37f87da7..e1eaedd435c 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -1080,7 +1080,7 @@ GHash *gp_copybuf_validate_colormap(bContext *C)
char *ma_name = BLI_ghashIterator_getValue(&gh_iter);
Material *ma = BLI_ghash_lookup(name_to_ma, ma_name);
- BKE_gpencil_handle_material(bmain, ob, ma);
+ BKE_gpencil_object_material_ensure(bmain, ob, ma);
/* Store this mapping (for use later when pasting) */
if (!BLI_ghash_haskey(new_colors, POINTER_FROM_INT(*key))) {
@@ -1334,7 +1334,7 @@ static int gp_strokes_paste_exec(bContext *C, wmOperator *op)
/* Remap material */
Material *ma = BLI_ghash_lookup(new_colors, POINTER_FROM_INT(new_stroke->mat_nr));
- new_stroke->mat_nr = BKE_gpencil_get_material_index(ob, ma);
+ new_stroke->mat_nr = BKE_gpencil_object_material_get_index(ob, ma);
BLI_assert(new_stroke->mat_nr >= 0); /* have to add the material first */
}
}
@@ -3957,7 +3957,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
/* add duplicate materials */
ma = give_current_material(ob, gps->mat_nr + 1); /* XXX same material can be in multiple slots */
- idx = BKE_gpencil_handle_material(bmain, ob_dst, ma);
+ idx = BKE_gpencil_object_material_ensure(bmain, ob_dst, ma);
/* selected points mode */
if (mode == GP_SEPARATE_POINT) {
@@ -4029,7 +4029,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
continue;
}
ma = give_current_material(ob, gps->mat_nr + 1);
- gps->mat_nr = BKE_gpencil_handle_material(bmain, ob_dst, ma);
+ gps->mat_nr = BKE_gpencil_object_material_ensure(bmain, ob_dst, ma);
}
}
}