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:
authorAntony Riakiotakis <kalast@gmail.com>2014-08-27 17:52:24 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-08-27 17:52:24 +0400
commit57ccd29caead1d2e07014dc320e3bd8caeaf8436 (patch)
tree17a04d5452db7071da0e9d80ae0ff66ac03f55e7 /source/blender/editors/sculpt_paint
parent4e3f76e06b6654d4951a54804eaa808b040ef942 (diff)
Only calculate texture paint slots from mtex if renderer is blender
internal. This should eliminate some confusion when people use external render engines.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c3
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 0ec813c2631..ded8a83a66c 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1445,10 +1445,9 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
Main *bmain = CTX_data_main(C);
Material *ma;
- bool use_nodes = BKE_scene_use_new_shading_nodes(scene);
/* This has to stay here to regenerate the texture paint
* cache in case we are loading a file */
- BKE_texpaint_slots_refresh_object(ob, use_nodes);
+ BKE_texpaint_slots_refresh_object(scene, ob);
paint_proj_mesh_data_ensure(C, ob, op);
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 3cf2fa42b8b..0822cd4c72d 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4886,7 +4886,7 @@ bool proj_paint_add_slot(bContext *C, Material *ma, wmOperator *op)
ima = mtex->tex->ima = BKE_image_add_generated(bmain, width, height, imagename, alpha ? 32 : 24, use_float,
gen_type, color);
- BKE_texpaint_slot_refresh_cache(ma, false);
+ BKE_texpaint_slot_refresh_cache(scene, ma);
BKE_image_signal(ima, NULL, IMA_SIGNAL_USER_NEW_IMAGE);
WM_event_add_notifier(C, NC_TEXTURE | NA_ADDED, mtex->tex);
WM_event_add_notifier(C, NC_IMAGE | NA_ADDED, ima);
@@ -4993,7 +4993,7 @@ static int texture_paint_delete_texture_paint_slot_exec(bContext *C, wmOperator
MEM_freeN(ma->mtex[i]);
ma->mtex[i] = NULL;
- BKE_texpaint_slot_refresh_cache(ma, false);
+ BKE_texpaint_slot_refresh_cache(scene, ma);
DAG_id_tag_update(&ma->id, 0);
WM_event_add_notifier(C, NC_MATERIAL, CTX_data_scene(C));
/* we need a notifier for data change since we change the displayed modifier uvs */