diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-07-22 23:05:54 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-07-22 23:06:10 +0400 |
commit | c32a671b3a7f2908c03bcb60f46ca40250dd08fa (patch) | |
tree | 98bf50090310d7d05f81fb86246c046bb2981981 /source/blender/makesrna/intern/rna_material.c | |
parent | 895f0f3dffd4ceb32e2e68c36cf834673e2f4093 (diff) |
Fix T41141, can't paint texture in cycles.
The issue is actually that creating a new image in texture paint mode
will set it always as a stencil image. Internally, the code checks if
the painted image is the same as the stencil and if it is, no painting
is done.
Solution is to expose a boolena to the operator for setting the image as
a stencil (could be an enum in th future for more uses)
Stencil UI is a bit weird here, will definitely redesign.
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 3c9eaf3c5db..46c5cc770b8 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -186,7 +186,7 @@ static void rna_Material_active_paint_texture_index_update(Main *bmain, Scene *s struct bNode *node; int index = 0; for (node = ma->nodetree->nodes.first; node; node = node->next) { - if (node->typeinfo->nclass == NODE_CLASS_TEXTURE) { + if (node->typeinfo->nclass == NODE_CLASS_TEXTURE && node->typeinfo->type == SH_NODE_TEX_IMAGE && node->id) { if (index++ == ma->paint_active_slot) { break; } |