diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-03-03 14:55:35 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-03-03 14:55:35 +0300 |
commit | 2a82162618f7b8325a59fe42336b2a5f215e7080 (patch) | |
tree | bd79cd69f936ace1acf7269a19efbfbbc37689a0 /source/blender/editors/sculpt_paint | |
parent | 22df0b2fe2998d51b6ca612867a995f848345f8d (diff) | |
parent | c0d0ef142fce15b839c369e9f7413c36b72aa8cb (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/editors/armature/pose_select.c
source/blender/editors/include/ED_armature.h
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-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 33e82a8e109..6a020dbdab2 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -5713,21 +5713,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) { |