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:
authorAntonioya <blendergit@gmail.com>2018-08-28 09:16:30 +0300
committerAntonioya <blendergit@gmail.com>2018-08-28 09:18:09 +0300
commit9a9b1e98849131358041cf2bb83bf7b7c9828119 (patch)
tree290cba0b98a1c6937670d8f578c189039123700a /source/blender/editors/gpencil/gpencil_brush.c
parent039b11f3497731572e36904b03550438b706df34 (diff)
GP: Revert replace custom function by standard API
Using custom api breaks material at object level
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_brush.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_brush.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index b7fc911100f..6eff4d3687f 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -1066,8 +1066,8 @@ static void gp_brush_clone_add(bContext *C, tGP_BrushEditData *gso)
/* Fix color references */
Material *ma = BLI_ghash_lookup(data->new_colors, &new_stroke->mat_nr);
- if ((ma) && (BKE_object_material_slot_find_index(ob, ma) > 0)) {
- gps->mat_nr = BKE_object_material_slot_find_index(ob, ma) - 1;
+ if ((ma) && (BKE_gpencil_get_material_index(ob, ma) > 0)) {
+ gps->mat_nr = BKE_gpencil_get_material_index(ob, ma) - 1;
CLAMP_MIN(gps->mat_nr, 0);
}
else {