37
43
struct wmWindowManager;
50
/* temp data to pass on to modal */
51
typedef struct bNodeLinkDrag
53
struct bNodeLinkDrag *next, *prev;
56
struct bNodeSocket *sock;
57
struct bNodeLink *link;
40
62
ARegion *node_has_buttons_region(ScrArea *sa);
42
64
/* node_header.c */
43
void node_header_buttons(const bContext *C, ARegion *ar);
44
void node_menus_register(struct ARegionType *art);
65
void node_menus_register(void);
68
void node_socket_circle_draw(struct bNodeTree *ntree, struct bNodeSocket *sock, float size);
69
void node_draw_default(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *node);
70
void node_update_default(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node);
71
void node_update_nodetree(const struct bContext *C, struct bNodeTree *ntree, float offsetx, float offsety);
72
void node_draw_nodetree(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode, struct bNodeTree *ntree);
47
73
void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d);
49
75
/* node_buttons.c */
55
81
void node_keymap(wmKeyConfig *keyconf);
57
83
/* node_select.c */
84
void node_select(struct bNode *node);
85
void node_deselect(struct bNode *node);
86
void node_deselect_all(struct SpaceNode *snode);
87
void node_socket_select(struct bNode *node, struct bNodeSocket *sock);
88
void node_socket_deselect(struct bNode *node, struct bNodeSocket *sock, int deselect_node);
89
void node_deselect_all_input_sockets(struct SpaceNode *snode, int deselect_nodes);
90
void node_deselect_all_output_sockets(struct SpaceNode *snode, int deselect_nodes);
91
int node_select_same_type(struct SpaceNode *snode);
92
int node_select_same_type_np(struct SpaceNode *snode, int dir);
93
void node_select_single(struct bContext *C, struct bNode *node);
58
95
void NODE_OT_select(struct wmOperatorType *ot);
59
96
void NODE_OT_select_all(wmOperatorType *ot);
60
97
void NODE_OT_select_linked_to(wmOperatorType *ot);
61
98
void NODE_OT_select_linked_from(wmOperatorType *ot);
62
void NODE_OT_visibility_toggle(struct wmOperatorType *ot);
63
void NODE_OT_view_all(struct wmOperatorType *ot);
64
99
void NODE_OT_select_border(struct wmOperatorType *ot);
65
100
void NODE_OT_select_same_type(struct wmOperatorType *ot);
66
101
void NODE_OT_select_same_type_next(wmOperatorType *ot);
67
102
void NODE_OT_select_same_type_prev(wmOperatorType *ot);
105
void NODE_OT_view_all(struct wmOperatorType *ot);
70
108
void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link);
71
void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int th_col2, int do_shaded);
109
void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 );
72
110
int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, float coord_array[][2], int resol);
111
void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 );
73
112
void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage);
75
void node_buts_group(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr);
78
115
void node_tree_from_ID(ID *id, bNodeTree **ntree, bNodeTree **edittree, int *treetype);
79
116
void snode_notify(bContext *C, SpaceNode *snode);
80
bNode *next_node(bNodeTree *ntree);
81
bNode *node_add_node(SpaceNode *snode, Scene *scene, int type, float locx, float locy);
117
void snode_dag_update(bContext *C, SpaceNode *snode);
118
bNode *node_add_node(struct SpaceNode *snode, struct Main *bmain, struct Scene *scene, struct bNodeTemplate *ntemp, float locx, float locy);
82
119
void snode_set_context(SpaceNode *snode, Scene *scene);
83
120
void snode_make_group_editable(SpaceNode *snode, bNode *gnode);
84
void node_set_active(SpaceNode *snode, bNode *node);
85
void node_deselectall(SpaceNode *snode);
86
int node_select_same_type(SpaceNode *snode);
87
int node_select_same_type_np(SpaceNode *snode, int dir);
88
121
void snode_composite_job(const struct bContext *C, ScrArea *sa);
89
122
bNode *node_tree_get_editgroup(bNodeTree *ntree);
90
void node_tree_verify_groups(bNodeTree *nodetree);
91
123
void snode_autoconnect(SpaceNode *snode, int allow_multiple, int replace);
92
124
int node_has_hidden_sockets(bNode *node);
93
125
void node_set_hidden_sockets(SpaceNode *snode, bNode *node, int set);
126
int node_render_changed_exec(bContext *, wmOperator *);
127
int node_find_indicated_socket(struct SpaceNode *snode, struct bNode **nodep, struct bNodeSocket **sockp, int in_out);
96
129
void NODE_OT_duplicate(struct wmOperatorType *ot);
97
130
void NODE_OT_delete(struct wmOperatorType *ot);
131
void NODE_OT_delete_reconnect(struct wmOperatorType *ot);
98
132
void NODE_OT_resize(struct wmOperatorType *ot);
100
134
void NODE_OT_link(struct wmOperatorType *ot);
101
135
void NODE_OT_link_make(struct wmOperatorType *ot);
102
136
void NODE_OT_links_cut(struct wmOperatorType *ot);
137
void NODE_OT_links_detach(struct wmOperatorType *ot);
104
139
void NODE_OT_group_make(struct wmOperatorType *ot);
105
140
void NODE_OT_group_ungroup(struct wmOperatorType *ot);
106
141
void NODE_OT_group_edit(struct wmOperatorType *ot);
142
void NODE_OT_group_socket_add(struct wmOperatorType *ot);
143
void NODE_OT_group_socket_remove(struct wmOperatorType *ot);
144
void NODE_OT_group_socket_move_up(struct wmOperatorType *ot);
145
void NODE_OT_group_socket_move_down(struct wmOperatorType *ot);
108
147
void NODE_OT_mute_toggle(struct wmOperatorType *ot);
109
148
void NODE_OT_hide_toggle(struct wmOperatorType *ot);
110
149
void NODE_OT_hide_socket_toggle(struct wmOperatorType *ot);
111
150
void NODE_OT_preview_toggle(struct wmOperatorType *ot);
151
void NODE_OT_options_toggle(struct wmOperatorType *ot);
113
153
void NODE_OT_show_cyclic_dependencies(struct wmOperatorType *ot);
114
154
void NODE_OT_link_viewer(struct wmOperatorType *ot);
115
155
void NODE_OT_read_fullsamplelayers(struct wmOperatorType *ot);
116
156
void NODE_OT_read_renderlayers(struct wmOperatorType *ot);
157
void NODE_OT_render_changed(struct wmOperatorType *ot);
117
159
void NODE_OT_backimage_move(struct wmOperatorType *ot);
118
160
void NODE_OT_backimage_zoom(struct wmOperatorType *ot);
161
void NODE_OT_backimage_sample(wmOperatorType *ot);
120
163
void NODE_OT_add_file(struct wmOperatorType *ot);
165
void NODE_OT_new_node_tree(struct wmOperatorType *ot);
167
void NODE_OT_output_file_add_socket(struct wmOperatorType *ot);
168
void NODE_OT_output_file_remove_active_socket(struct wmOperatorType *ot);
170
extern const char *node_context_dir[];
124
174
// XXX from BSE_node.h
125
175
#define HIDDEN_RAD 15.0f
126
176
#define BASIS_RAD 8.0f
177
#define NODE_DYS (U.widget_unit/2)
178
#define NODE_DY U.widget_unit
129
179
#define NODE_SOCKSIZE 5
131
181
// XXX button events (butspace)