~siretart/ubuntu/utopic/blender/libav10

« 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: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * $Id: node_intern.h 29319 2010-06-07 20:03:40Z campbellbarton $
3
 
 *
 
1
/*
4
2
 * ***** BEGIN GPL LICENSE BLOCK *****
5
3
 *
6
4
 * This program is free software; you can redistribute it and/or
25
23
 *
26
24
 * ***** END GPL LICENSE BLOCK *****
27
25
 */
28
 
#ifndef ED_NODE_INTERN_H
29
 
#define ED_NODE_INTERN_H
 
26
 
 
27
/** \file blender/editors/space_node/node_intern.h
 
28
 *  \ingroup spnode
 
29
 */
 
30
 
 
31
#ifndef __NODE_INTERN_H__
 
32
#define __NODE_INTERN_H__
 
33
 
 
34
#include <stddef.h> /* for size_t */
 
35
#include "UI_interface.h"
30
36
 
31
37
/* internal exports only */
32
38
 
35
41
struct View2D;
36
42
struct bContext;
37
43
struct wmWindowManager;
 
44
struct bNodeTemplate;
 
45
struct bNode;
 
46
struct bNodeSocket;
 
47
struct bNodeLink;
 
48
struct Main;
 
49
 
 
50
/* temp data to pass on to modal */
 
51
typedef struct bNodeLinkDrag
 
52
{
 
53
        struct bNodeLinkDrag *next, *prev;
 
54
        
 
55
        struct bNode *node;
 
56
        struct bNodeSocket *sock;
 
57
        struct bNodeLink *link;
 
58
        int in_out;
 
59
} bNodeLinkDrag;
38
60
 
39
61
/* space_node.c */
40
62
ARegion *node_has_buttons_region(ScrArea *sa);
41
63
 
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);
45
66
 
46
67
/* node_draw.c */
 
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);
48
74
 
49
75
/* node_buttons.c */
55
81
void node_keymap(wmKeyConfig *keyconf);
56
82
 
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);
 
94
 
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);
68
103
 
 
104
/* node_state.c */
 
105
void NODE_OT_view_all(struct wmOperatorType *ot);
 
106
 
69
107
/* drawnode.c */
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);
74
113
 
75
 
void node_buts_group(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr);
76
 
 
77
114
/* node_edit.c */
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);
94
 
 
 
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);
95
128
 
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);
99
133
 
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);
103
138
 
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);
107
146
 
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);
112
152
 
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);
 
158
 
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);
119
162
 
120
163
void NODE_OT_add_file(struct wmOperatorType *ot);
121
164
 
 
165
void NODE_OT_new_node_tree(struct wmOperatorType *ot);
 
166
 
 
167
void NODE_OT_output_file_add_socket(struct wmOperatorType *ot);
 
168
void NODE_OT_output_file_remove_active_socket(struct wmOperatorType *ot);
 
169
 
 
170
extern const char *node_context_dir[];
 
171
 
122
172
// XXXXXX
123
173
 
124
174
// XXX from BSE_node.h
125
175
#define HIDDEN_RAD              15.0f
126
176
#define BASIS_RAD               8.0f
127
 
#define NODE_DYS                10
128
 
#define NODE_DY                 20
 
177
#define NODE_DYS                (U.widget_unit/2)
 
178
#define NODE_DY                 U.widget_unit
129
179
#define NODE_SOCKSIZE   5
130
180
 
131
181
// XXX button events (butspace)
148
198
        B_NODE_SETIMAGE,
149
199
} eNodeSpace_ButEvents;
150
200
 
151
 
#endif /* ED_NODE_INTERN_H */
 
201
#endif /* __NODE_INTERN_H__ */