[Bf-blender-cvs] [0aa2fe3] cycles-ptex-24: Allow ptex node to be a texpaint slot

Nicholas Bishop noreply at git.blender.org
Fri Jan 30 18:00:39 CET 2015


Commit: 0aa2fe3e6e8e8a0bdb3667b3903185c0d3442798
Author: Nicholas Bishop
Date:   Thu Jan 22 22:34:46 2015 +0100
Branches: cycles-ptex-24
https://developer.blender.org/rB0aa2fe3e6e8e8a0bdb3667b3903185c0d3442798

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 9b682f1..5886f18 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -1371,8 +1371,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) {
@@ -1410,6 +1416,15 @@ void BKE_texpaint_slot_refresh_cache(Scene *scene, Material *ma)
 				}
 				index++;
 			}
+			//  TODO
+			if (node->typeinfo->nclass == NODE_CLASS_TEXTURE &&
+				node->typeinfo->type == SH_NODE_TEX_PTEX)
+			{
+				if (active_node == node)
+					ma->paint_active_slot = index;
+				//ma->texpaintslot[index++].ima =;
+				index++;
+			}
 		}
 	}
 	else if (is_bi) {




More information about the Bf-blender-cvs mailing list