diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-05-22 18:13:33 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-05-22 18:13:33 +0400 |
commit | 53b01d90023a850b17ded5deb9cace354c8e298a (patch) | |
tree | ab8ce43ddf8046dc54e2cacc5ff46cbc5806910b /source/blender/makesdna | |
parent | 85923aff288da072750447b44e492ebe5c59bcce (diff) |
A number of new features for the node editor in general and the Frame node in particular.
For an detailed user-level description of new features see the following blogpost:
http://code.blender.org/index.php/2012/05/node-editing-tweaks/
TL;DR:
* Frame node gets more usable bounding-box behavior
* Node resizing has helpful mouse cursor indicators and works on all borders
* Node selection/active colors are themeable independently
* Customizable background colors for nodes (useful for frames visual
distinction).
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 6d3e57b6034..b2781675cbe 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -154,11 +154,13 @@ typedef struct bNode { struct bNode *next, *prev, *new_node; char name[64]; /* MAX_NAME */ - short type, flag; + int flag; + short type, pad2; short done, level; /* both for dependency and sorting */ short lasty, menunr; /* lasty: check preview render status, menunr: browse ID blocks */ short stack_index; /* for groupnode, offset in global caller stack */ short nr; /* number of this node in list, used for UI exec events */ + float color[3]; /* custom user-defined color */ ListBase inputs, outputs; struct bNode *parent; /* parent node */ @@ -168,6 +170,7 @@ typedef struct bNode { float locx, locy; /* root offset for drawing */ float width, height; /* node custom width and height */ float miniwidth; /* node width if hidden */ + float offsetx, offsety; /* additional offset from loc */ int update; /* update flags */ @@ -209,6 +212,8 @@ typedef struct bNode { #define NODE_TRANSFORM (1<<13) /* node is active texture */ #define NODE_ACTIVE_TEXTURE (1<<14) + /* use a custom color for the node */ +#define NODE_CUSTOM_COLOR (1<<15) /* node->update */ /* XXX NODE_UPDATE is a generic update flag. More fine-grained updates @@ -348,6 +353,11 @@ typedef struct bNodeSocketValueRGBA { #define CMP_NODE_DILATEERODE_STEP 0 #define CMP_NODE_DILATEERODE_DISTANCE 1 +typedef struct NodeFrame { + short flag; + short label_size; +} NodeFrame; + /* this one has been replaced with ImageUser, keep it for do_versions() */ typedef struct NodeImageAnim { int frames, sfra, nr; @@ -607,6 +617,10 @@ typedef struct TexNodeOutput { char name[64]; } TexNodeOutput; +/* frame node flags */ +#define NODE_FRAME_SHRINK 1 /* keep the bounding box minimal */ +#define NODE_FRAME_RESIZEABLE 2 /* test flag, if frame can be resized by user */ + /* comp channel matte */ #define CMP_NODE_CHANNEL_MATTE_CS_RGB 1 #define CMP_NODE_CHANNEL_MATTE_CS_HSV 2 |