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:
Diffstat (limited to 'source/blender/editors/include/ED_node.h')
-rw-r--r--source/blender/editors/include/ED_node.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h
index e68617f7867..5bac452c7c9 100644
--- a/source/blender/editors/include/ED_node.h
+++ b/source/blender/editors/include/ED_node.h
@@ -77,6 +77,7 @@ struct bNodeTree *ED_node_tree_get(struct SpaceNode *snode, int level);
void ED_node_set_active_viewer_key(struct SpaceNode *snode);
/* 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);
@@ -87,6 +88,12 @@ void ED_node_draw_snap(
struct View2D *v2d, const float cent[2], float size, NodeBorder border, unsigned int pos);
/* node_draw.cc */
+
+/**
+ * Draw a single node socket at default size.
+ * \note this is only called from external code, internally #node_socket_draw_nested() is used for
+ * optimized drawing of multiple/all sockets of a node.
+ */
void ED_node_socket_draw(struct bNodeSocket *sock,
const struct rcti *rect,
const float color[4],
@@ -94,22 +101,46 @@ void ED_node_socket_draw(struct bNodeSocket *sock,
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, struct bNode *node);
+/**
+ * Sort nodes by selection: unselected nodes first, then selected,
+ * then the active node at the very end. Relative order is kept intact.
+ */
void ED_node_sort(struct bNodeTree *ntree);
float ED_node_grid_size(void);
/* node_relationships.c */
+
+/**
+ * Test == 0, clear all intersect flags.
+ */
void ED_node_link_intersect_test(struct ScrArea *area, int test);
+/**
+ * Assumes link with #NODE_LINKFLAG_HILITE set.
+ */
void ED_node_link_insert(struct Main *bmain, struct ScrArea *area);
/* node_edit.c */
+
void ED_node_set_tree_type(struct SpaceNode *snode, struct bNodeTreeType *typeinfo);
bool ED_node_is_compositor(struct SpaceNode *snode);
bool ED_node_is_shader(struct SpaceNode *snode);
bool ED_node_is_texture(struct SpaceNode *snode);
bool ED_node_is_geometry(struct SpaceNode *snode);
+/**
+ * Assumes nothing being done in ntree yet, sets the default in/out node.
+ * Called from shading buttons or header.
+ */
void ED_node_shader_default(const struct bContext *C, struct ID *id);
+/**
+ * Assumes nothing being done in ntree yet, sets the default in/out node.
+ * Called from shading buttons or header.
+ */
void ED_node_composit_default(const struct bContext *C, struct Scene *scene);
+/**
+ * Assumes nothing being done in ntree yet, sets the default in/out node.
+ * Called from shading buttons or header.
+ */
void ED_node_texture_default(const struct bContext *C, struct Tex *tex);
bool ED_node_select_check(const ListBase *lb);
void ED_node_select_all(ListBase *lb, int action);
@@ -120,19 +151,34 @@ void ED_node_set_active(struct Main *bmain,
struct bNode *node,
bool *r_active_texture_changed);
+/**
+ * \param scene_owner: is the owner of the job,
+ * we don't use it for anything else currently so could also be a void pointer,
+ * but for now keep it an 'Scene' for consistency.
+ *
+ * \note only call from spaces `refresh` callbacks, not direct! - use with care.
+ */
void ED_node_composite_job(const struct bContext *C,
struct bNodeTree *nodetree,
struct Scene *scene_owner);
/* node_ops.c */
+
void ED_operatormacros_node(void);
/* node_view.c */
+/**
+ * Returns mouse position in image space.
+ */
bool ED_space_node_get_position(struct Main *bmain,
struct SpaceNode *snode,
struct ARegion *region,
const int mval[2],
float fpos[2]);
+/**
+ * Returns color in linear space, matching #ED_space_image_color_sample().
+ * And here we've got recursion in the comments tips...
+ */
bool ED_space_node_color_sample(struct Main *bmain,
struct SpaceNode *snode,
struct ARegion *region,