[Bf-blender-cvs] [b8abe3b] cycles-ptex-12: Allow ptex node to be a texpaint slot
Nicholas Bishop
noreply at git.blender.org
Mon Jan 26 02:05:13 CET 2015
Commit: b8abe3bc2409a4d442d89d9be621e5c9b48c4019
Author: Nicholas Bishop
Date: Thu Jan 22 22:34:46 2015 +0100
Branches: cycles-ptex-12
https://developer.blender.org/rBb8abe3bc2409a4d442d89d9be621e5c9b48c4019
Allow ptex node to be a texpaint slot
===================================================================
M source/blender/blenkernel/intern/material.c
===================================================================
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 981064b..f2496d9 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -1351,8 +1351,14 @@ void BKE_texpaint_slot_refresh_cache(Scene *scene, Material *ma)
}
for (node = ma->nodetree->nodes.first; node; node = node->next) {
- if (node->typeinfo->nclass == NODE_CLASS_TEXTURE && node->typeinfo->type == SH_NODE_TEX_IMAGE && node->id)
- count++;
+ if (node->typeinfo->nclass == NODE_CLASS_TEXTURE) {
+ if (node->typeinfo->type == SH_NODE_TEX_IMAGE && node->id) {
+ count++;
+ }
+ else if (node->typeinfo->type == SH_NODE_TEX_PTEX) {
+ count++;
+ }
+ }
}
if (count == 0) {
@@ -1365,10 +1371,17 @@ void BKE_texpaint_slot_refresh_cache(Scene *scene, Material *ma)
active_node = nodeGetActiveTexture(ma->nodetree);
for (node = ma->nodetree->nodes.first; node; node = node->next) {
- if (node->typeinfo->nclass == NODE_CLASS_TEXTURE && node->typeinfo->type == SH_NODE_TEX_IMAGE && node->id) {
- if (active_node == node)
- ma->paint_active_slot = index;
- ma->texpaintslot[index++].ima = (Image *)node->id;
+ if (node->typeinfo->nclass == NODE_CLASS_TEXTURE) {
+ if (node->typeinfo->type == SH_NODE_TEX_IMAGE && node->id) {
+ if (active_node == node)
+ ma->paint_active_slot = index;
+ ma->texpaintslot[index++].ima = (Image *)node->id;
+ }
+ else if (node->typeinfo->type == SH_NODE_TEX_PTEX) {
+ if (active_node == node)
+ ma->paint_active_slot = index;
+ //ma->texpaintslot[index++].ima =;
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list