diff options
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 58 |
1 files changed, 41 insertions, 17 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index fe422bfa689..803e5418bcc 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +30,10 @@ #ifndef DNA_NODE_TYPES_H #define DNA_NODE_TYPES_H +/** \file DNA_node_types.h + * \ingroup DNA + */ + #include "DNA_ID.h" #include "DNA_vec_types.h" #include "DNA_listBase.h" @@ -66,21 +70,29 @@ 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 pad1; 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; + int to_index; /* XXX deprecated, only used for restoring old group node links */ + int pad2; - 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 */ @@ -95,11 +107,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; @@ -149,7 +166,7 @@ typedef struct bNode { #define NODE_TEST 256 /* composite: don't do node but pass on buffer(s) */ #define NODE_MUTED 512 -#define NODE_CUSTOM_NAME 1024 +#define NODE_CUSTOM_NAME 1024 /* deprecated! */ typedef struct bNodeLink { struct bNodeLink *next, *prev; @@ -181,7 +198,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]; @@ -203,7 +220,11 @@ typedef struct bNodeTree { #define NTREE_EXEC_INIT 2 /* ntree->flag */ -#define NTREE_DS_EXPAND 1 /* for animation editors */ +#define NTREE_DS_EXPAND 1 /* for animation editors */ +/* XXX not nice, but needed as a temporary flag + * for group updates after library linking. + */ +#define NTREE_DO_VERSIONS 1024 /* data structs, for node->storage */ @@ -216,12 +237,11 @@ typedef struct NodeImageAnim { typedef struct NodeBlurData { short sizex, sizey; - short samples, maxspeed, minspeed, relative; + short samples, maxspeed, minspeed, relative, aspect; + short curved; float fac, percentx, percenty; short filtertype; char bokeh, gamma; - short curved; - short pad; int image_in_width, image_in_height; /* needed for absolute/relative conversions */ } NodeBlurData; @@ -336,4 +356,8 @@ typedef struct TexNodeOutput { #define CMP_NODE_CHANNEL_MATTE_CS_YUV 3 #define CMP_NODE_CHANNEL_MATTE_CS_YCC 4 +#define CMP_NODE_BLUR_ASPECT_NONE 0 +#define CMP_NODE_BLUR_ASPECT_Y 1 +#define CMP_NODE_BLUR_ASPECT_X 2 + #endif |