Blender Git Loki

Git Commits -> Revision 3bae60d

Revision 3bae60d by Lukas Toenne (master)
February 22, 2012, 12:24 (GMT)
Adds a new node type for saving multiple image files from a single node.

Unlike the existing file output node this node has an arbitrary number of
possible input slots. It has a base path string that can be set to a general
base folder. Every input socket then uses its name as an extension of the base
path for file organization. This can include further subfolders on top of the
base path. Example:

Base path: '/home/user/myproject'
Input 1: 'Compo'
Input 2: 'Diffuse/'
Input 3: 'details/Normals'

would create output files
in /home/user/myproject: Compo0001.png, Compo0002.png, ...
in /home/user/myproject/Diffuse: 0001.png, 0002.png, ... (no filename base
given)
in /home/user/myproject/details: Normals0001.png, Normals0002.png, ...

Most settings for the node can be found in the sidebar (NKEY). New input sockets
can be added with the "Add Input" button. There is a list of input sockets and
below that the details for each socket can be changed, including the sub-path
and filename. Sockets can be removed here as well. By default each socket uses
the render settings file output format, but each can use its own format if
necessary.

To my knowledge this is the first node making use of such dynamic sockets in
trunk. So this is also a design test, other nodes might use this in the future.

Adding operator buttons on top of a node is a bit unwieldy atm, because all node
operators generally work on selected and/or active node(s). The operator button
would therefore either have to make sure the node is activated before the
operator is called (block callback maybe?) OR it has to store the node name
(risky, weak reference). For now it is only used in the sidebar, where only the
active node's buttons are displayed.

Also adds a new struct_type value to bNodeSocket, in order to distinguish
different socket types with the same data type (file inputs are SOCK_RGBA color
sockets). Would be nicer to use data type only for actual data evaluation, but
used in too many places, this works ok for now.

Commit Details:

Full Hash: 3bae60d0c9e7629d29d1569201dd07e968acd600
SVN Revision: 44322
Parent Commit: dadc2a2
Lines Changed: +514, -79

15 Modified Paths:

/source/blender/blenkernel/BKE_node.h (+6, -2) (Diff)
/source/blender/blenkernel/intern/node.c (+1, -0) (Diff)
/source/blender/blenloader/intern/writefile.c (+6, -0) (Diff)
/source/blender/editors/space_node/drawnode.c (+121, -39) (Diff)
/source/blender/editors/space_node/node_draw.c (+2, -8) (Diff)
/source/blender/editors/space_node/node_edit.c (+74, -0) (Diff)
/source/blender/editors/space_node/node_header.c (+18, -0) (Diff)
/source/blender/editors/space_node/node_intern.h (+3, -0) (Diff)
/source/blender/editors/space_node/node_ops.c (+3, -0) (Diff)
/source/blender/makesdna/DNA_node_types.h (+17, -1) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+89, -18) (Diff)
/source/blender/makesrna/intern/rna_nodetree_types.h (+1, -0) (Diff)
/source/blender/makesrna/RNA_access.h (+1, -0) (Diff)
/source/blender/nodes/composite/nodes/node_composite_outputFile.c (+171, -11) (Diff)
/source/blender/nodes/NOD_composite.h (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021