Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-03-18 20:34:57 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-03-18 20:34:57 +0400
commit4638e5f99a9ba59ad0b8a1fd52b12e876480b9e8 (patch)
tree2444f12b4612440f44cf02835cdf5951b6564e92 /source/blender/makesdna/DNA_space_types.h
parent7bfef29f2f2a1b262d28abdc6e30fcd9c1f1caad (diff)
Merge of the PyNodes branch (aka "custom nodes") into trunk.
PyNodes opens up the node system in Blender to scripters and adds a number of UI-level improvements. === Dynamic node type registration === Node types can now be added at runtime, using the RNA registration mechanism from python. This enables addons such as render engines to create a complete user interface with nodes. Examples of how such nodes can be defined can be found in my personal wiki docs atm [1] and as a script template in release/scripts/templates_py/custom_nodes.py [2]. === Node group improvements === Each node editor now has a tree history of edited node groups, which allows opening and editing nested node groups. The node editor also supports pinning now, so that different spaces can be used to edit different node groups simultaneously. For more ramblings and rationale see (really old) blog post on code.blender.org [3]. The interface of node groups has been overhauled. Sockets of a node group are no longer displayed in columns on either side, but instead special input/output nodes are used to mirror group sockets inside a node tree. This solves the problem of long node lines in groups and allows more adaptable node layout. Internal sockets can be exposed from a group by either connecting to the extension sockets in input/output nodes (shown as empty circle) or by adding sockets from the node property bar in the "Interface" panel. Further details such as the socket name can also be changed there. [1] http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes [2] http://projects.blender.org/scm/viewvc.php/trunk/blender/release/scripts/templates_py/custom_nodes.py?view=markup&root=bf-blender [3] http://code.blender.org/index.php/2012/01/improving-node-group-interface-editing/
Diffstat (limited to 'source/blender/makesdna/DNA_space_types.h')
-rw-r--r--source/blender/makesdna/DNA_space_types.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 0873c2278c5..a810f4219e0 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -43,6 +43,7 @@
#include "DNA_image_types.h" /* ImageUser */
#include "DNA_movieclip_types.h" /* MovieClipUser */
#include "DNA_sequence_types.h" /* SequencerScopes */
+#include "DNA_node_types.h" /* for bNodeInstanceKey */
/* Hum ... Not really nice... but needed for spacebuts. */
#include "DNA_view2d_types.h"
@@ -880,6 +881,17 @@ typedef struct SpaceScript {
/* Nodes Editor =========================================== */
/* Node Editor */
+
+typedef struct bNodeTreePath {
+ struct bNodeTreePath *next, *prev;
+
+ struct bNodeTree *nodetree;
+ bNodeInstanceKey parent_key; /* base key for nodes in this tree instance */
+ int pad;
+ /* XXX this is not automatically updated when node names are changed! */
+ char node_name[64]; /* MAX_NAME */
+} bNodeTreePath;
+
typedef struct SpaceNode {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
@@ -897,12 +909,24 @@ typedef struct SpaceNode {
float zoom; /* zoom for backdrop */
float cursor[2]; /* mouse pos for drawing socketless link and adding nodes */
+ /* XXX nodetree pointer info is all in the path stack now,
+ * remove later on and use bNodeTreePath instead. For now these variables are set when pushing/popping
+ * from path stack, to avoid having to update all the functions and operators. Can be done when
+ * design is accepted and everything is properly tested.
+ */
+ ListBase treepath;
+
struct bNodeTree *nodetree, *edittree;
- int treetype; /* treetype: as same nodetree->type */
+
+ /* tree type for the current node tree */
+ char tree_idname[64];
+ int treetype DNA_DEPRECATED; /* treetype: as same nodetree->type */
+ int pad3;
+
short texfrom; /* texfrom object, world or brush */
short shaderfrom; /* shader from object or world */
short recalc; /* currently on 0/1, for auto compo */
- short pad[3];
+ short pad4;
ListBase linkdrag; /* temporary data for modal linking operator */
struct bGPdata *gpd; /* grease-pencil data */
@@ -921,6 +945,7 @@ typedef enum eSpaceNode_Flag {
SNODE_SHOW_HIGHLIGHT = (1 << 6),
SNODE_USE_HIDDEN_PREVIEW = (1 << 10),
SNODE_NEW_SHADERS = (1 << 11),
+ SNODE_PIN = (1 << 12),
} eSpaceNode_Flag;
/* snode->texfrom */