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:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-06-12 11:27:50 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-06-12 11:27:50 +0400
commit43d1df9f47e3729eecd35b83a3483f525f29ec3e (patch)
tree679fafee05bc3abe580e6cc92cb9686d7cf05bd9 /source/blender/makesrna/intern/rna_nodetree.c
parent2127e62c9b2d05351013ceb5996cddc38925b457 (diff)
Fix #31675 Reroute nodes aren't working for cycles.
Note that currently the reroute nodes are hardcoded to color values, which means they will not work for shader type connections (and possibly cause overhead for float and vector conversion). Looking into a solution.
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index ca61b532862..92de882d48b 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -1058,6 +1058,7 @@ static void init(void)
reg_node(NODE_FORLOOP, Category_LoopNode, "FORLOOP", "NodeForLoop", "Node", "ForLoop", "");
reg_node(NODE_WHILELOOP, Category_LoopNode, "WHILELOOP", "NodeWhileLoop", "Node", "WhileLoop", "");
reg_node(NODE_FRAME, Category_LayoutNode, "FRAME", "NodeFrame", "Node", "Frame", "");
+ reg_node(NODE_REROUTE, Category_LayoutNode, "REROUTE", "NodeReroute", "Node", "Reroute", "");
}
static StructRNA *def_node(BlenderRNA *brna, int node_id)
@@ -1075,7 +1076,7 @@ static StructRNA *def_node(BlenderRNA *brna, int node_id)
static void alloc_node_type_items(EnumPropertyItem *items, int category)
{
int i;
- int count = 3;
+ int count = 4;
EnumPropertyItem *item = items;
for (i = 0; i < MaxNodes; i++)
@@ -1105,6 +1106,14 @@ static void alloc_node_type_items(EnumPropertyItem *items, int category)
item++;
+ item->value = NODE_REROUTE;
+ item->identifier = "REROUTE";
+ item->icon = 0;
+ item->name = "Reroute";
+ item->description = "";
+
+ item++;
+
/* NOTE!, increase 'count' when adding items here */
memset(item, 0, sizeof(EnumPropertyItem));
@@ -4208,6 +4217,7 @@ void RNA_def_nodetree(BlenderRNA *brna)
define_specific_node(brna, NODE_FORLOOP, def_forloop);
define_specific_node(brna, NODE_WHILELOOP, def_whileloop);
define_specific_node(brna, NODE_FRAME, def_frame);
+ define_specific_node(brna, NODE_REROUTE, 0);
/* special socket types */
rna_def_cmp_output_file_slot_file(brna);