~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/blenkernel/BKE_node.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2007-05-17 11:47:59 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517114759-yp4ybrnhp2u7pk66
Tags: 2.44-1
* New upstream release.
* Drop debian/patches/01_64bits_stupidity, not needed anymore: as of this
  version blender is 64 bits safe again. Adjust README.Debian accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: BKE_node.h,v 1.38 2007/02/07 18:47:48 scourage Exp $
 
2
 * $Id: BKE_node.h,v 1.47 2007/04/13 04:22:31 scourage Exp $
3
3
 *
4
4
 * ***** BEGIN GPL LICENSE BLOCK *****
5
5
 *
33
33
#ifndef BKE_NODE_H
34
34
#define BKE_NODE_H
35
35
 
 
36
 
 
37
 
36
38
struct ID;
37
39
struct bNodeTree;
38
40
struct bNode;
64
66
} bNodeSocketType;
65
67
 
66
68
typedef struct bNodeType {
 
69
        void *next,*prev;
67
70
        int type;
68
71
        char *name;
69
72
        float width, minwidth, maxwidth;
75
78
        
76
79
        void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **);
77
80
        
78
 
        /* after this line is set on startup of blender */
 
81
        /* this line is set on startup of blender */
79
82
        int (*butfunc)(struct uiBlock *, struct bNodeTree *, struct bNode *, struct rctf *);
80
83
 
 
84
        void (*initfunc)(struct bNode *);
 
85
        void (*freestoragefunc)(struct bNode *);
 
86
        void (*copystoragefunc)(struct bNode *, struct bNode *);
 
87
        
 
88
        /* for use with dynamic typedefs */
 
89
        ID *id;
 
90
        void *script; /* holds pointer to python script */
 
91
        void *dict; /* holds pointer to python script dictionary (scope)*/
 
92
 
81
93
} bNodeType;
82
94
 
 
95
/* node->exec, now in use for composites (#define for break is same as ready yes) */
 
96
#define NODE_PROCESSING 1
 
97
#define NODE_READY              2
 
98
#define NODE_BREAK              2
 
99
#define NODE_FINISHED   4
 
100
#define NODE_FREEBUFS   8
 
101
 
83
102
/* nodetype->nclass, for add-menu and themes */
84
103
#define NODE_CLASS_INPUT                0
85
104
#define NODE_CLASS_OUTPUT               1
86
105
#define NODE_CLASS_OP_COLOR             3
87
 
#define NODE_CLASS_OP_VECTOR    4
88
 
#define NODE_CLASS_OP_FILTER    5
 
106
#define NODE_CLASS_OP_VECTOR            4
 
107
#define NODE_CLASS_OP_FILTER            5
89
108
#define NODE_CLASS_GROUP                6
90
109
#define NODE_CLASS_FILE                 7
91
 
#define NODE_CLASS_CONVERTOR    8
 
110
#define NODE_CLASS_CONVERTOR            8
92
111
#define NODE_CLASS_MATTE                9
93
112
#define NODE_CLASS_DISTORT              10
94
113
 
98
117
 
99
118
struct bNodeTree *ntreeAddTree(int type);
100
119
void                    ntreeInitTypes(struct bNodeTree *ntree);
 
120
 
101
121
void                    ntreeMakeOwnType(struct bNodeTree *ntree);
102
122
void                    ntreeFreeTree(struct bNodeTree *ntree);
103
123
struct bNodeTree *ntreeCopyTree(struct bNodeTree *ntree, int internal_select);
151
171
 
152
172
/* ************** COMMON NODES *************** */
153
173
 
154
 
#define NODE_GROUP                      2
 
174
#define NODE_GROUP              2
155
175
#define NODE_GROUP_MENU         1000
156
176
 
157
177
extern bNodeType node_group_typeinfo;
169
189
#define SH_NODE_OUTPUT          1
170
190
 
171
191
#define SH_NODE_MATERIAL        100
172
 
#define SH_NODE_RGB                     101
 
192
#define SH_NODE_RGB             101
173
193
#define SH_NODE_VALUE           102
174
194
#define SH_NODE_MIX_RGB         103
175
195
#define SH_NODE_VALTORGB        104
183
203
#define SH_NODE_CAMERA          114
184
204
#define SH_NODE_MATH            115
185
205
#define SH_NODE_VECT_MATH       116
186
 
#define SH_NODE_SQUEEZE     117
187
 
/* custom defines: options for Material node */
188
 
#define SH_NODE_MAT_DIFF        1
189
 
#define SH_NODE_MAT_SPEC        2
190
 
#define SH_NODE_MAT_NEG         4
 
206
#define SH_NODE_SQUEEZE         117
 
207
 
 
208
 
 
209
/* custom defines options for Material node */
 
210
#define SH_NODE_MAT_DIFF   1
 
211
#define SH_NODE_MAT_SPEC   2
 
212
#define SH_NODE_MAT_NEG    4
191
213
 
192
214
/* the type definitions array */
193
 
extern bNodeType *node_all_shaders[];
 
215
extern struct ListBase node_all_shaders;
194
216
 
195
217
/* API */
196
218
 
199
221
void                    nodeShaderSynchronizeID(struct bNode *node, int copyto);
200
222
 
201
223
                                /* switch material render loop */
 
224
extern void (*node_shader_lamp_loop)(struct ShadeInput *, struct ShadeResult *);
202
225
void                    set_node_shader_lamp_loop(void (*lamp_loop_func)(struct ShadeInput *, struct ShadeResult *));
203
226
 
 
227
 
204
228
/* ************** COMPOSITE NODES *************** */
205
229
 
 
230
/* output socket defines */
 
231
#define RRES_OUT_IMAGE  0
 
232
#define RRES_OUT_ALPHA  1
 
233
#define RRES_OUT_Z      2
 
234
#define RRES_OUT_NORMAL 3
 
235
#define RRES_OUT_UV     4
 
236
#define RRES_OUT_VEC    5
 
237
#define RRES_OUT_RGBA   6
 
238
#define RRES_OUT_DIFF   7
 
239
#define RRES_OUT_SPEC   8
 
240
#define RRES_OUT_SHADOW 9
 
241
#define RRES_OUT_AO     10
 
242
#define RRES_OUT_REFLECT 11
 
243
#define RRES_OUT_REFRACT 12
 
244
#define RRES_OUT_RADIO   13
 
245
#define RRES_OUT_INDEXOB 14
 
246
 
206
247
/* note: types are needed to restore callbacks, don't change values */
207
248
#define CMP_NODE_VIEWER         201
208
249
#define CMP_NODE_RGB            202
223
264
#define CMP_NODE_SEPHSVA        217
224
265
#define CMP_NODE_SETALPHA       218
225
266
#define CMP_NODE_HUE_SAT        219
226
 
#define CMP_NODE_IMAGE                  220
227
 
#define CMP_NODE_R_LAYERS               221
228
 
#define CMP_NODE_COMPOSITE              222
 
267
#define CMP_NODE_IMAGE          220
 
268
#define CMP_NODE_R_LAYERS       221
 
269
#define CMP_NODE_COMPOSITE      222
229
270
#define CMP_NODE_OUTPUT_FILE    223
230
 
#define CMP_NODE_TEXTURE                224
231
 
#define CMP_NODE_TRANSLATE              225
232
 
#define CMP_NODE_ZCOMBINE               226
233
 
#define CMP_NODE_COMBRGBA               227
 
271
#define CMP_NODE_TEXTURE        224
 
272
#define CMP_NODE_TRANSLATE      225
 
273
#define CMP_NODE_ZCOMBINE       226
 
274
#define CMP_NODE_COMBRGBA       227
234
275
#define CMP_NODE_DILATEERODE    228
235
 
#define CMP_NODE_ROTATE                 229
236
 
#define CMP_NODE_SCALE                  230
237
 
#define CMP_NODE_SEPYCCA                231
238
 
#define CMP_NODE_COMBYCCA               232
239
 
#define CMP_NODE_SEPYUVA                233
240
 
#define CMP_NODE_COMBYUVA               234
241
 
#define CMP_NODE_DIFF_MATTE             235
 
276
#define CMP_NODE_ROTATE         229
 
277
#define CMP_NODE_SCALE          230
 
278
#define CMP_NODE_SEPYCCA        231
 
279
#define CMP_NODE_COMBYCCA       232
 
280
#define CMP_NODE_SEPYUVA        233
 
281
#define CMP_NODE_COMBYUVA       234
 
282
#define CMP_NODE_DIFF_MATTE     235
242
283
#define CMP_NODE_COLOR_SPILL    236
243
 
#define CMP_NODE_CHROMA                 237
 
284
#define CMP_NODE_CHROMA         237
244
285
#define CMP_NODE_CHANNEL_MATTE  238
245
 
#define CMP_NODE_FLIP                   239
 
286
#define CMP_NODE_FLIP           239
246
287
#define CMP_NODE_SPLITVIEWER    240
247
 
#define CMP_NODE_INDEX_MASK             241
248
 
#define CMP_NODE_MAP_UV                 242
249
 
#define CMP_NODE_ID_MASK                243
250
 
#define CMP_NODE_DEFOCUS                244
251
 
#define CMP_NODE_DISPLACE               245
252
 
#define CMP_NODE_COMBHSVA               246
253
 
#define CMP_NODE_MATH                   247
254
 
#define CMP_NODE_LUMA_MATTE             248
 
288
#define CMP_NODE_INDEX_MASK     241
 
289
#define CMP_NODE_MAP_UV         242
 
290
#define CMP_NODE_ID_MASK        243
 
291
#define CMP_NODE_DEFOCUS        244
 
292
#define CMP_NODE_DISPLACE       245
 
293
#define CMP_NODE_COMBHSVA       246
 
294
#define CMP_NODE_MATH           247
 
295
#define CMP_NODE_LUMA_MATTE     248
255
296
 
 
297
#define CMP_NODE_BRIGHTCONTRAST 249
 
298
#define CMP_NODE_GAMMA          250
256
299
 
257
300
/* filter types */
258
 
 
259
 
 
260
 
/* filter types, in custom1 */
261
 
 
262
301
#define CMP_FILT_SOFT           0
263
302
#define CMP_FILT_SHARP          1
264
303
#define CMP_FILT_LAPLACE        2
271
310
#define CMP_SCALE_RELATIVE      0
272
311
#define CMP_SCALE_ABSOLUTE      1
273
312
 
 
313
 
274
314
/* the type definitions array */
275
 
extern bNodeType *node_all_composit[];
 
315
extern struct ListBase node_all_composit;
276
316
 
277
317
/* API */
278
318
struct CompBuf;
279
319
void ntreeCompositTagRender(struct Scene *sce);
280
 
void ntreeCompositTagAnimated(struct bNodeTree *ntree);
 
320
int ntreeCompositTagAnimated(struct bNodeTree *ntree);
281
321
void ntreeCompositTagGenerators(struct bNodeTree *ntree);
282
322
void ntreeCompositForceHidden(struct bNodeTree *ntree);
283
323
 
284
324
void free_compbuf(struct CompBuf *cbuf); /* internal...*/
285
325
 
 
326
void init_nodesystem(void);
 
327
void free_nodesystem(void);
 
328
 
286
329
#endif