Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/include/ED_node.h
| Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | |||||
| void ED_node_tree_push(struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *gnode); | void ED_node_tree_push(struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *gnode); | ||||
| void ED_node_tree_pop(struct SpaceNode *snode); | void ED_node_tree_pop(struct SpaceNode *snode); | ||||
| int ED_node_tree_depth(struct SpaceNode *snode); | int ED_node_tree_depth(struct SpaceNode *snode); | ||||
| struct bNodeTree *ED_node_tree_get(struct SpaceNode *snode, int level); | struct bNodeTree *ED_node_tree_get(struct SpaceNode *snode, int level); | ||||
| void ED_node_set_active_viewer_key(struct SpaceNode *snode); | void ED_node_set_active_viewer_key(struct SpaceNode *snode); | ||||
| /* drawnode.c */ | /* drawnode.c */ | ||||
| void ED_node_init_butfuncs(void); | void ED_node_init_butfuncs(void); | ||||
| void ED_init_custom_node_type(struct bNodeType *ntype); | void ED_init_custom_node_type(struct bNodeType *ntype); | ||||
| void ED_init_custom_node_socket_type(struct bNodeSocketType *stype); | void ED_init_custom_node_socket_type(struct bNodeSocketType *stype); | ||||
| void ED_init_standard_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_init_node_socket_type_virtual(struct bNodeSocketType *stype); | ||||
| void ED_node_sample_set(const float col[4]); | void ED_node_sample_set(const float col[4]); | ||||
| void ED_node_draw_snap( | void ED_node_draw_snap( | ||||
| struct View2D *v2d, const float cent[2], float size, NodeBorder border, unsigned int pos); | struct View2D *v2d, const float cent[2], float size, NodeBorder border, unsigned int pos); | ||||
| /* node_draw.cc */ | /* 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, | void ED_node_socket_draw(struct bNodeSocket *sock, | ||||
| const struct rcti *rect, | const struct rcti *rect, | ||||
| const float color[4], | const float color[4], | ||||
| float scale); | float scale); | ||||
| void ED_node_tree_update(const struct bContext *C); | void ED_node_tree_update(const struct bContext *C); | ||||
| void ED_node_tag_update_id(struct ID *id); | void ED_node_tag_update_id(struct ID *id); | ||||
| void ED_node_tag_update_nodetree(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node); | 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); | void ED_node_sort(struct bNodeTree *ntree); | ||||
| float ED_node_grid_size(void); | float ED_node_grid_size(void); | ||||
| /* node_relationships.c */ | /* node_relationships.c */ | ||||
| /** | |||||
| * Test == 0, clear all intersect flags. | |||||
| */ | |||||
| void ED_node_link_intersect_test(struct ScrArea *area, int test); | 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); | void ED_node_link_insert(struct Main *bmain, struct ScrArea *area); | ||||
| /* node_edit.c */ | /* node_edit.c */ | ||||
| void ED_node_set_tree_type(struct SpaceNode *snode, struct bNodeTreeType *typeinfo); | void ED_node_set_tree_type(struct SpaceNode *snode, struct bNodeTreeType *typeinfo); | ||||
| bool ED_node_is_compositor(struct SpaceNode *snode); | bool ED_node_is_compositor(struct SpaceNode *snode); | ||||
| bool ED_node_is_shader(struct SpaceNode *snode); | bool ED_node_is_shader(struct SpaceNode *snode); | ||||
| bool ED_node_is_texture(struct SpaceNode *snode); | bool ED_node_is_texture(struct SpaceNode *snode); | ||||
| bool ED_node_is_geometry(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); | 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); | 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); | void ED_node_texture_default(const struct bContext *C, struct Tex *tex); | ||||
| bool ED_node_select_check(const ListBase *lb); | bool ED_node_select_check(const ListBase *lb); | ||||
| void ED_node_select_all(ListBase *lb, int action); | void ED_node_select_all(ListBase *lb, int action); | ||||
| void ED_node_post_apply_transform(struct bContext *C, struct bNodeTree *ntree); | void ED_node_post_apply_transform(struct bContext *C, struct bNodeTree *ntree); | ||||
| void ED_node_set_active(struct Main *bmain, | void ED_node_set_active(struct Main *bmain, | ||||
| struct SpaceNode *snode, | struct SpaceNode *snode, | ||||
| struct bNodeTree *ntree, | struct bNodeTree *ntree, | ||||
| struct bNode *node, | struct bNode *node, | ||||
| bool *r_active_texture_changed); | 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, | void ED_node_composite_job(const struct bContext *C, | ||||
| struct bNodeTree *nodetree, | struct bNodeTree *nodetree, | ||||
| struct Scene *scene_owner); | struct Scene *scene_owner); | ||||
| /* node_ops.c */ | /* node_ops.c */ | ||||
| void ED_operatormacros_node(void); | void ED_operatormacros_node(void); | ||||
| /* node_view.c */ | /* node_view.c */ | ||||
| /** | |||||
| * Returns mouse position in image space. | |||||
| */ | |||||
| bool ED_space_node_get_position(struct Main *bmain, | bool ED_space_node_get_position(struct Main *bmain, | ||||
| struct SpaceNode *snode, | struct SpaceNode *snode, | ||||
| struct ARegion *region, | struct ARegion *region, | ||||
| const int mval[2], | const int mval[2], | ||||
| float fpos[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, | bool ED_space_node_color_sample(struct Main *bmain, | ||||
| struct SpaceNode *snode, | struct SpaceNode *snode, | ||||
| struct ARegion *region, | struct ARegion *region, | ||||
| const int mval[2], | const int mval[2], | ||||
| float r_col[3]); | float r_col[3]); | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||