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-07-22 23:05:54 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-07-22 23:06:10 +0400
commitc32a671b3a7f2908c03bcb60f46ca40250dd08fa (patch)
tree98bf50090310d7d05f81fb86246c046bb2981981 /source/blender/makesrna/intern/rna_material.c
parent895f0f3dffd4ceb32e2e68c36cf834673e2f4093 (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.c2
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;
}