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 20:52:17 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-08-27 20:52:17 +0400
commitbe585a25942738ff8da5382a46cb8823d565069a (patch)
tree32124a83531ae0758295c468f652d9b096a5b7e9 /source/blender/editors/sculpt_paint/paint_image.c
parenta77b46fbe6c04dc9369a83dda465da4d511cd10d (diff)
More fixes for renderer material detection
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index ded8a83a66c..ea6d56155cc 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1363,6 +1363,7 @@ void paint_proj_mesh_data_ensure(bContext *C, Object *ob, wmOperator *op)
Mesh *me;
int layernum;
ImagePaintSettings *imapaint = &(CTX_data_tool_settings(C)->imapaint);
+ Scene *scene = CTX_data_scene(C);
Brush *br = BKE_paint_brush(&imapaint->paint);
/* no material, add one */
@@ -1380,7 +1381,12 @@ void paint_proj_mesh_data_ensure(bContext *C, Object *ob, wmOperator *op)
Material *ma = give_current_material(ob, i);
if (ma) {
if (!ma->texpaintslot) {
- proj_paint_add_slot(C, ma, NULL);
+ /* refresh here just in case */
+ BKE_texpaint_slot_refresh_cache(scene, ma);
+
+ /* if still no slots, we have to add */
+ if (!ma->texpaintslot)
+ proj_paint_add_slot(C, ma, NULL);
}
}
else {