diff options
author | Schoen <schoepas@deher1m1598.emea.adsint.biz> | 2017-04-03 08:52:05 +0300 |
---|---|---|
committer | Schoen <schoepas@deher1m1598.emea.adsint.biz> | 2017-04-03 09:47:02 +0300 |
commit | 90778901c9ea1e16d5907981e91bceba25ff207d (patch) | |
tree | 00bf16ee403c3ab1b507a5ec90b098a22e050f7c /source/blender/editors/sculpt_paint/paint_image_proj.c | |
parent | 76eebd9379a5dad519ff01cf215fbe3db6de931e (diff) | |
parent | 3bf0026bec6f839ae0f7c40bde845299ce22e8de (diff) |
Merge branch 'master' into cycles_disney_brdfcycles_disney_brdf
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index f5d115442c6..d0f1cc99b8d 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -5711,21 +5711,16 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op) /* successful creation of mtex layer, now create set */ if (mtex) { int type = MAP_COL; - int type_id = 0; + char imagename_buff[MAX_ID_NAME - 2]; + const char *imagename = DATA_("Diffuse Color"); if (op) { - int i; type = RNA_enum_get(op->ptr, "type"); - - for (i = 0; i < ARRAY_SIZE(layer_type_items); i++) { - if (layer_type_items[i].value == type) { - type_id = i; - break; - } - } + RNA_string_get(op->ptr, "name", imagename_buff); + imagename = imagename_buff; } - mtex->tex = BKE_texture_add(bmain, DATA_(layer_type_items[type_id].name)); + mtex->tex = BKE_texture_add(bmain, imagename); mtex->mapto = type; if (mtex->tex) { |