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 00:16:02 +0300
committerAntonioya <blendergit@gmail.com>2018-08-28 00:16:02 +0300
commit9195b5b3b138a8c5c18196bd7b1f421574e46d02 (patch)
tree173b25827c15a3ba1a7cf7e2731ef0687ae5a526 /source/blender/makesrna/intern
parent35c1baef27b81959d2c16f9f5e935fc91fb02667 (diff)
GP: Replace custom function by standard API
Replace BKE_gpencil_get_material_index by BKE_object_material_slot_find_index
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 3df84a3a85b..bc5b1fa7f13 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -171,6 +171,7 @@ static EnumPropertyItem rna_enum_gpencil_brush_icons_items[] = {
#include "BKE_colorband.h"
#include "BKE_brush.h"
#include "BKE_icons.h"
+#include "BKE_material.h"
#include "BKE_gpencil.h"
#include "BKE_paint.h"
@@ -425,7 +426,7 @@ static void rna_Brush_material_update(bContext *C, PointerRNA *ptr)
BrushGpencilSettings *gpencil_settings = br->gpencil_settings;
if (gpencil_settings->material != NULL) {
- index = BKE_gpencil_get_material_index(ob, gpencil_settings->material);
+ index = BKE_object_material_slot_find_index(ob, gpencil_settings->material);
if ((index > 0) && (ob->actcol != index)) {
ob->actcol = index;
/* update other brushes to keep all synchro */