~ubuntu-branches/ubuntu/trusty/blender/trusty-proposed

« back to all changes in this revision

Viewing changes to source/blender/editors/space_node/node_intern.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2013-08-14 10:43:49 UTC
  • mfrom: (14.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20130814104349-t1d5mtwkphp12dyj
Tags: 2.68a-3
* Upload to unstable
* debian/: python3.3 Depends simplified
  - debian/control: python3.3 Depends dropped
    for blender-data package
  - 0001-blender_thumbnailer.patch refreshed
* debian/control: libavcodec b-dep versioning dropped

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#define __NODE_INTERN_H__
33
33
 
34
34
#include <stddef.h> /* for size_t */
 
35
#include "BKE_node.h"
35
36
#include "UI_interface.h"
36
37
 
37
38
/* internal exports only */
43
44
struct wmWindow;
44
45
struct wmWindowManager;
45
46
struct wmEvent;
46
 
struct bNodeTemplate;
47
47
struct bNode;
48
48
struct bNodeSocket;
49
49
struct bNodeLink;
66
66
ARegion *node_has_buttons_region(ScrArea *sa);
67
67
ARegion *node_has_tools_region(ScrArea *sa);
68
68
 
69
 
/* node_header.c */
70
 
void node_menus_register(void);
 
69
void snode_group_offset(struct SpaceNode *snode, float *x, float *y);   /* transform between View2Ds in the tree path */
71
70
 
72
71
/* node_draw.c */
73
72
int node_get_colorid(struct bNode *node);
74
 
void node_socket_circle_draw(struct bNodeTree *ntree, struct bNodeSocket *sock, float size, int highlight);
 
73
void node_socket_circle_draw(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node,
 
74
                             struct bNodeSocket *sock, float size, int highlight);
75
75
int node_get_resize_cursor(int directions);
76
76
void node_draw_shadow(struct SpaceNode *snode, struct bNode *node, float radius, float alpha);
77
 
void node_draw_default(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *node);
 
77
void node_draw_default(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode,
 
78
                       struct bNodeTree *ntree, struct bNode *node, bNodeInstanceKey key);
78
79
void node_update_default(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node);
79
80
int node_select_area_default(struct bNode *node, int x, int y);
80
81
int node_tweak_area_default(struct bNode *node, int x, int y);
81
 
void node_update_nodetree(const struct bContext *C, struct bNodeTree *ntree, float offsetx, float offsety);
82
 
void node_draw_nodetree(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode, struct bNodeTree *ntree);
83
 
void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d);
 
82
void node_update_nodetree(const struct bContext *C, struct bNodeTree *ntree);
 
83
void node_draw_nodetree(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode,
 
84
                        struct bNodeTree *ntree, bNodeInstanceKey parent_key);
 
85
void drawnodespace(const bContext *C, ARegion *ar);
84
86
 
85
87
void node_set_cursor(struct wmWindow *win, struct SpaceNode *snode);
86
88
        /* DPI scaled coords */
100
102
void node_keymap(struct wmKeyConfig *keyconf);
101
103
 
102
104
/* node_select.c */
103
 
void node_select(struct bNode *node);
104
 
void node_deselect(struct bNode *node);
105
105
void node_deselect_all(struct SpaceNode *snode);
106
106
void node_socket_select(struct bNode *node, struct bNodeSocket *sock);
107
107
void node_socket_deselect(struct bNode *node, struct bNodeSocket *sock, int deselect_node);
118
118
void NODE_OT_select_border(struct wmOperatorType *ot);
119
119
void NODE_OT_select_lasso(struct wmOperatorType *ot);
120
120
void NODE_OT_select_same_type(struct wmOperatorType *ot);
121
 
void NODE_OT_select_same_type_next(struct wmOperatorType *ot);
122
 
void NODE_OT_select_same_type_prev(struct wmOperatorType *ot);
 
121
void NODE_OT_select_same_type_step(struct wmOperatorType *ot);
 
122
void NODE_OT_find_node(struct wmOperatorType *ot);
123
123
 
124
124
/* node_view.c */
 
125
int space_node_view_flag(struct bContext *C, SpaceNode *snode, ARegion *ar, const int node_flag);
 
126
 
125
127
void NODE_OT_view_all(struct wmOperatorType *ot);
126
128
void NODE_OT_view_selected(struct wmOperatorType *ot);
127
129
 
132
134
/* drawnode.c */
133
135
void node_draw_link(struct View2D *v2d, struct SpaceNode *snode, struct bNodeLink *link);
134
136
void node_draw_link_bezier(struct View2D *v2d, struct SpaceNode *snode, struct bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3);
135
 
int node_link_bezier_points(struct View2D * v2d, struct SpaceNode * snode, struct bNodeLink * link, float coord_array[][2], int resol);
 
137
int  node_link_bezier_points(struct View2D *v2d, struct SpaceNode *snode, struct bNodeLink *link, float coord_array[][2], int resol);
136
138
// 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 );
137
 
void draw_nodespace_back_pix(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode);
 
139
void draw_nodespace_back_pix(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode, bNodeInstanceKey parent_key);
138
140
 
139
141
 
140
142
/* node_add.c */
141
 
bNode *node_add_node(struct SpaceNode *snode, struct Main *bmain, struct Scene *scene,
142
 
                     struct bNodeTemplate *ntemp, float locx, float locy);
 
143
bNode *node_add_node(const struct bContext *C, const char *idname, int type, float locx, float locy);
143
144
void NODE_OT_add_reroute(struct wmOperatorType *ot);
 
145
void NODE_OT_add_file(struct wmOperatorType *ot);
 
146
void NODE_OT_new_node_tree(struct wmOperatorType *ot);
144
147
 
145
148
 
146
149
/* node_group.c */
147
150
void NODE_OT_group_make(struct wmOperatorType *ot);
 
151
void NODE_OT_group_insert(struct wmOperatorType *ot);
148
152
void NODE_OT_group_ungroup(struct wmOperatorType *ot);
149
153
void NODE_OT_group_separate(struct wmOperatorType *ot);
150
154
void NODE_OT_group_edit(struct wmOperatorType *ot);
151
 
void NODE_OT_group_socket_add(struct wmOperatorType *ot);
152
 
void NODE_OT_group_socket_remove(struct wmOperatorType *ot);
153
 
void NODE_OT_group_socket_move_up(struct wmOperatorType *ot);
154
 
void NODE_OT_group_socket_move_down(struct wmOperatorType *ot);
155
 
 
156
 
 
157
 
/* note_add.c */
158
 
void NODE_OT_add_file(struct wmOperatorType *ot);
159
 
void NODE_OT_new_node_tree(struct wmOperatorType *ot);
160
155
 
161
156
 
162
157
/* node_relationships.c */
175
170
void NODE_OT_link_viewer(struct wmOperatorType *ot);
176
171
 
177
172
/* node_edit.c */
178
 
void node_tree_from_ID(ID *id, bNodeTree **ntree, bNodeTree **edittree, int *treetype);
179
173
void snode_notify(struct bContext *C, struct SpaceNode *snode);
180
174
void snode_dag_update(struct bContext *C, struct SpaceNode *snode);
181
 
void snode_set_context(struct SpaceNode *snode, Scene *scene);
182
 
void snode_make_group_editable(struct SpaceNode *snode, struct bNode *gnode);
 
175
void snode_set_context(const struct bContext *C);
183
176
 
184
 
bNode *node_tree_get_editgroup(bNodeTree *ntree);
185
177
void snode_update(struct SpaceNode *snode, struct bNode *node);
186
 
bNode *editnode_get_active(bNodeTree *ntree);
187
178
int composite_node_active(struct bContext *C);
 
179
int composite_node_editable(struct bContext *C);
188
180
 
189
181
int node_has_hidden_sockets(bNode *node);
190
182
void node_set_hidden_sockets(SpaceNode *snode, bNode *node, int set);
215
207
void NODE_OT_clipboard_copy(struct wmOperatorType *ot);
216
208
void NODE_OT_clipboard_paste(struct wmOperatorType *ot);
217
209
 
 
210
void NODE_OT_tree_socket_add(struct wmOperatorType *ot);
 
211
void NODE_OT_tree_socket_remove(struct wmOperatorType *ot);
 
212
void NODE_OT_tree_socket_move(struct wmOperatorType *ot);
 
213
 
218
214
void NODE_OT_shader_script_update(struct wmOperatorType *ot);
219
215
 
 
216
void NODE_OT_viewer_border(struct wmOperatorType *ot);
 
217
 
220
218
extern const char *node_context_dir[];
221
219
 
222
220
// XXXXXX
226
224
#define BASIS_RAD       (0.4f * U.widget_unit)
227
225
#define NODE_DYS        (U.widget_unit / 2)
228
226
#define NODE_DY         U.widget_unit
 
227
#define NODE_SOCKDY     (0.08f * U.widget_unit)
229
228
#define NODE_WIDTH(node)        (node->width * UI_DPI_FAC)
230
229
#define NODE_MARGIN_X   (0.75f * U.widget_unit)
231
230
#define NODE_SOCKSIZE   (0.25f * U.widget_unit)
232
231
#define NODE_LINK_RESOL 12
233
232
 
234
233
// XXX button events (butspace)
235
 
enum {
 
234
enum eNodeSpace_ButEvents {
236
235
        B_NOP = 0,
237
236
        B_REDR = 1,
238
237
        B_NODE_USEMAT,
249
248
        B_MATPRV,
250
249
        B_NODE_LOADIMAGE,
251
250
        B_NODE_SETIMAGE,
252
 
} eNodeSpace_ButEvents;
 
251
};
253
252
 
254
253
#endif /* __NODE_INTERN_H__ */