diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-02-21 16:47:49 +0300 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-02-21 16:47:49 +0300 |
commit | 1c7a422f78805a0533d9623c3f11f682f0c98083 (patch) | |
tree | 196f722f1446e1bfd262f63b50e95b6a389a2656 /source/blender/makesdna | |
parent | 9ef0eed4b64325092dc90bf2db0ca9825fd94f83 (diff) |
Big node groups improvement patch. Node group trees now have their own lists of input/output sockets. Those can be linked to internal nodes just like links between regular nodes. In addition group sockets can be renamed and have a defined order, which can be modified, and they can be removed again.
More details can be found in the patch tracker description (#24883) and on the code.blender.org development blog.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index a9f688e29b9..0a4c672273b 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -70,21 +70,27 @@ typedef struct bNodeSocket { char name[32]; bNodeStack ns; /* custom data for inputs, only UI writes in this */ - short type, flag; /* type is copy from socket type struct */ - short limit, stack_index; /* limit for dependency sort, stack_index for exec */ - short intern; /* intern = tag for group nodes */ - short stack_index_ext; /* for groups, to find the caller stack index */ - int pad1; + short type, flag; + short limit; /* max. number of links */ + + /* stack data info (only during execution!) */ + short stack_type; /* type of stack reference */ + /* XXX only one of stack_ptr or stack_index is used (depending on stack_type). + * could store the index in the pointer with SET_INT_IN_POINTER (a bit ugly). + * (union won't work here, not supported by DNA) + */ + struct bNodeStack *stack_ptr; /* constant input value */ + short stack_index; /* local stack index or external input number */ + short pad; float locx, locy; /* internal data to retrieve relations and groups */ - int own_index, to_index; /* group socket identifiers, to find matching pairs after reading files */ + int own_index; /* group socket identifiers, to find matching pairs after reading files */ + struct bNodeSocket *groupsock; - struct bNodeSocket *tosock; /* group-node sockets point to the internal group counterpart sockets, set after read file */ struct bNodeLink *link; /* a link pointer, set in nodeSolveOrder() */ - } bNodeSocket; /* sock->type */ @@ -99,11 +105,16 @@ typedef struct bNodeSocket { #define SOCK_IN_USE 4 /* unavailable is for dynamic sockets */ #define SOCK_UNAVAIL 8 -# -# + +/* sock->stack_type */ +#define SOCK_STACK_LOCAL 1 /* part of the local tree stack */ +#define SOCK_STACK_EXTERN 2 /* use input stack pointer */ +#define SOCK_STACK_CONST 3 /* use pointer to constant input value */ + typedef struct bNodePreview { unsigned char *rect; short xsize, ysize; + int pad; } bNodePreview; @@ -185,7 +196,7 @@ typedef struct bNodeTree { int flag, pad; ListBase alltypes; /* type definitions */ - struct bNodeType *owntype; /* for groups or dynamic trees, no read/write */ + ListBase inputs, outputs; /* external sockets for group nodes */ int pad2[2]; @@ -208,6 +219,7 @@ typedef struct bNodeTree { /* ntree->flag */ #define NTREE_DS_EXPAND 1 /* for animation editors */ +#define NTREE_AUTO_EXPOSE 2 /* automatically make unhidden, unlinked group sockets external */ /* data structs, for node->storage */ |