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
path: root/source
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2011-12-18 19:34:06 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2011-12-18 19:34:06 +0400
commit5f6bd44c82bef24a43696449d8b905beeb53015b (patch)
tree7e955e53c4e9ee8a44c716b79ceaeebc34511b08 /source
parentb49463c439820c5039caf63421bdc8f3a58554b2 (diff)
Generalized node groups for Cycles.
This allows group nodes inside other group nodes in cycles and makes the code more generic for all possible cases, like direct group input-to-output links and unused group sockets. Previous code tried to connect external nodes and internal group sockets by following links until a "real" node input/output. This quickly becomes complicated in corner cases as described above and can lead to unexpected behavior when the group socket is of a different type than the internal/external sockets, but that conversion is skipped. The new code uses the concept of "proxy nodes" similar to what the new compositor does. Each group socket is replaced with a proxy node with a single input and output, to which other nodes in the same tree and internal nodes can link to. After all groups have been expanded in the graph, these proxy nodes are removed again, adding converter nodes if necessary.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index c588dc9c8ac..c15758eed1f 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -64,9 +64,13 @@ EnumPropertyItem nodetree_type_items[] = {
EnumPropertyItem node_socket_type_items[] = {
- {SOCK_FLOAT, "VALUE", 0, "Value", ""},
- {SOCK_VECTOR, "VECTOR", 0, "Vector", ""},
- {SOCK_RGBA, "RGBA", 0, "RGBA", ""},
+ {SOCK_FLOAT, "VALUE", 0, "Value", ""},
+ {SOCK_VECTOR, "VECTOR", 0, "Vector", ""},
+ {SOCK_RGBA, "RGBA", 0, "RGBA", ""},
+ {SOCK_SHADER, "SHADER", 0, "Shader", ""},
+ {SOCK_BOOLEAN, "BOOLEAN", 0, "Boolean", ""},
+ {SOCK_MESH, "MESH", 0, "Mesh", ""},
+ {SOCK_INT, "INT", 0, "Int", ""},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem node_math_items[] = {