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/editors/include/ED_node.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/editors/include/ED_node.h')
-rw-r--r--source/blender/editors/include/ED_node.h35
1 files changed, 29 insertions, 6 deletions
diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h
index 32baa8883e1..448a15334c7 100644
--- a/source/blender/editors/include/ED_node.h
+++ b/source/blender/editors/include/ED_node.h
@@ -39,7 +39,10 @@ struct Tex;
struct bContext;
struct bNodeTree;
struct bNode;
+struct bNodeType;
+struct bNodeSocketType;
struct bNodeTree;
+struct bNodeTreeType;
struct ScrArea;
struct Scene;
struct View2D;
@@ -51,15 +54,30 @@ typedef enum {
NODE_RIGHT = 8
} NodeBorder;
+/* space_node.c */
+int ED_node_tree_path_length(struct SpaceNode *snode);
+void ED_node_tree_path_get(struct SpaceNode *snode, char *value);
+void ED_node_tree_path_get_fixedbuf(struct SpaceNode *snode, char *value, int max_length);
+
+void ED_node_tree_start(struct SpaceNode *snode, struct bNodeTree *ntree, struct ID *id, struct ID *from);
+void ED_node_tree_push(struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *gnode);
+void ED_node_tree_pop(struct SpaceNode *snode);
+int ED_node_tree_depth(struct SpaceNode *snode);
+struct bNodeTree *ED_node_tree_get(struct SpaceNode *snode, int level);
+
/* drawnode.c */
void ED_node_init_butfuncs(void);
+void ED_init_custom_node_type(struct bNodeType *ntype);
+void ED_init_custom_node_socket_type(struct bNodeSocketType *stype);
+void ED_init_standard_node_socket_type(struct bNodeSocketType *stype);
+void ED_init_node_socket_type_virtual(struct bNodeSocketType *stype);
void ED_node_sample_set(const float col[4]);
void ED_node_draw_snap(struct View2D *v2d, const float cent[2], float size, NodeBorder border);
/* node_draw.c */
-void ED_node_tree_update(struct SpaceNode *snode, struct Scene *scene);
-void ED_node_changed_update(struct ID *id, struct bNode *node);
-void ED_node_generic_update(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node);
+void ED_node_tree_update(const struct bContext *C);
+void ED_node_tag_update_id(struct ID *id);
+void ED_node_tag_update_nodetree(struct Main *bmain, struct bNodeTree *ntree);
void ED_node_sort(struct bNodeTree *ntree);
/* node_relationships.c */
@@ -67,9 +85,14 @@ void ED_node_link_intersect_test(struct ScrArea *sa, int test);
void ED_node_link_insert(struct ScrArea *sa);
/* node_edit.c */
-void ED_node_shader_default(struct Scene *scene, struct ID *id);
-void ED_node_composit_default(struct Scene *sce);
-void ED_node_texture_default(struct Tex *tex);
+void ED_node_set_tree_type(struct SpaceNode *snode, struct bNodeTreeType *typeinfo);
+int ED_node_is_compositor(struct SpaceNode *snode);
+int ED_node_is_shader(struct SpaceNode *snode);
+int ED_node_is_texture(struct SpaceNode *snode);
+
+void ED_node_shader_default(const struct bContext *C, struct ID *id);
+void ED_node_composit_default(const struct bContext *C, struct Scene *scene);
+void ED_node_texture_default(const struct bContext *C, struct Tex *tex);
int ED_node_select_check(ListBase *lb);
void ED_node_post_apply_transform(struct bContext *C, struct bNodeTree *ntree);
void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node);