[Bf-codereview] Flexible node groups in cycles (issue 5485055)

lukas.toenne at googlemail.com lukas.toenne at googlemail.com
Tue Dec 13 18:04:03 CET 2011


Reviewers: bf-codereview_blender.org,

Description:
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.

Please review this at http://codereview.appspot.com/5485055/

Affected files:
   intern/cycles/blender/blender_shader.cpp
   intern/cycles/render/graph.cpp
   intern/cycles/render/graph.h
   intern/cycles/render/nodes.cpp
   intern/cycles/render/nodes.h
   source/blender/makesrna/intern/rna_nodetree.c




More information about the Bf-codereview mailing list