163
165
/// Create a template from an existing node.
164
166
struct bNodeTemplate (*templatefunc)(struct bNode *);
165
167
/** If a node can be made from the template in the given node tree.
166
* \example Node groups can not be created inside their own node tree.
168
* \note Node groups can not be created inside their own node tree.
168
170
int (*validfunc)(struct bNodeTree *ntree, struct bNodeTemplate *ntemp);
178
180
struct bNodeTree *(*group_edit_set)(struct bNode *node, int edit);
179
181
void (*group_edit_clear)(struct bNode *node);
183
/* Generate a temporary list of internal links (bNodeLink), for muting and disconnect operators.
184
* Result must be freed by caller!
186
ListBase (*internal_connect)(struct bNodeTree *, struct bNode *node);
182
188
/* **** execution callbacks **** */
183
189
void *(*initexecfunc)(struct bNode *node);
187
193
* when a final generic version of execution code is defined, this will be changed anyway
189
195
void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **);
190
/* This is the muting callback.
191
* XXX Mimics the newexecfunc signature... Not sure all of this will be useful, we will see.
193
void (*mutefunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **);
194
/* And the muting util.
195
* Returns links as a ListBase, as pairs of bNodeStack* if in/out bNodeStacks were provided,
196
* else as pairs of bNodeSocket* if node tree was provided.
198
ListBase (*mutelinksfunc)(struct bNodeTree *, struct bNode *, struct bNodeStack **, struct bNodeStack **,
199
struct GPUNodeStack *, struct GPUNodeStack *);
201
197
int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out);
202
198
/* extended gpu function */
203
199
int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out);
204
/* This is the muting gpu callback.
205
* XXX Mimics the gpuextfunc signature... Not sure all of this will be useful, we will see.
207
int (*gpumutefunc)(struct GPUMaterial *, struct bNode *, void *, struct GPUNodeStack *, struct GPUNodeStack *);
210
202
/* node->exec, now in use for composites (#define for break is same as ready yes) */
283
275
int (*validate_link)(struct bNodeTree *ntree, struct bNodeLink *link);
285
/* Default muting pointers. */
286
void (*mutefunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **);
287
ListBase (*mutelinksfunc)(struct bNodeTree *, struct bNode *, struct bNodeStack **, struct bNodeStack **,
288
struct GPUNodeStack *, struct GPUNodeStack *);
290
int (*gpumutefunc)(struct GPUMaterial *, struct bNode *, void *, struct GPUNodeStack *, struct GPUNodeStack *);
277
/* Default internal linking. */
278
ListBase (*internal_connect)(struct bNodeTree *, struct bNode *node);
293
281
/* ************** GENERIC API, TREES *************** */
341
329
void nodeUnlinkNode(struct bNodeTree *ntree, struct bNode *node);
342
330
void nodeUniqueName(struct bNodeTree *ntree, struct bNode *node);
344
void nodeRegisterType(struct bNodeTreeType *ttype, struct bNodeType *ntype) ;
332
void nodeRegisterType(struct bNodeTreeType *ttype, struct bNodeType *ntype);
345
333
void nodeMakeDynamicType(struct bNode *node);
346
334
int nodeDynamicUnlinkText(struct ID *txtid);
351
339
struct bNodeLink *nodeAddLink(struct bNodeTree *ntree, struct bNode *fromnode, struct bNodeSocket *fromsock, struct bNode *tonode, struct bNodeSocket *tosock);
352
340
void nodeRemLink(struct bNodeTree *ntree, struct bNodeLink *link);
353
341
void nodeRemSocketLinks(struct bNodeTree *ntree, struct bNodeSocket *sock);
342
void nodeInternalRelink(struct bNodeTree *ntree, struct bNode *node);
355
344
void nodeSpaceCoords(struct bNode *node, float *locx, float *locy);
356
345
void nodeAttachNode(struct bNode *node, struct bNode *parent);
375
364
void nodeFreePreview(struct bNode *node);
377
366
int nodeSocketIsHidden(struct bNodeSocket *sock);
367
void nodeSocketSetType(struct bNodeSocket *sock, int type);
379
369
/* ************** NODE TYPE ACCESS *************** */
416
406
void (*freeexecfunc)(struct bNode *node, void *nodedata),
417
407
void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata,
418
408
struct bNodeStack **, struct bNodeStack **));
419
void node_type_mute(struct bNodeType *ntype,
420
void (*mutefunc)(void *data, int thread, struct bNode *, void *nodedata,
421
struct bNodeStack **, struct bNodeStack **),
422
ListBase (*mutelinksfunc)(struct bNodeTree *, struct bNode *, struct bNodeStack **,
423
struct bNodeStack **, struct GPUNodeStack*, struct GPUNodeStack*));
409
void node_type_internal_connect(struct bNodeType *ntype, ListBase (*internal_connect)(struct bNodeTree *, struct bNode *));
424
410
void node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node,
425
411
struct GPUNodeStack *in, struct GPUNodeStack *out));
426
412
void node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node,
427
413
void *nodedata, struct GPUNodeStack *in,
428
414
struct GPUNodeStack *out));
429
void node_type_gpu_mute(struct bNodeType *ntype, int (*gpumutefunc)(struct GPUMaterial *, struct bNode *, void *,
430
struct GPUNodeStack *, struct GPUNodeStack *));
431
415
void node_type_compatibility(struct bNodeType *ntype, short compatibility);
433
417
/* ************** COMMON NODES *************** */
653
637
#define CMP_NODE_TRANSFORM 264
654
638
#define CMP_NODE_MOVIEDISTORTION 265
655
639
#define CMP_NODE_DOUBLEEDGEMASK 266
640
#define CMP_NODE_OUTPUT_MULTI_FILE__DEPRECATED 267 /* DEPRECATED multi file node has been merged into regular CMP_NODE_OUTPUT_FILE */
657
642
#define CMP_NODE_GLARE 301
658
643
#define CMP_NODE_TONEMAP 302
692
677
void ntreeCompositForceHidden(struct bNodeTree *ntree, struct Scene *scene);
693
678
void ntreeCompositClearTags(struct bNodeTree *ntree);
680
struct bNodeSocket *ntreeCompositOutputFileAddSocket(struct bNodeTree *ntree, struct bNode *node,
681
const char *name, struct ImageFormatData *im_format);
682
int ntreeCompositOutputFileRemoveActiveSocket(struct bNodeTree *ntree, struct bNode *node);
696
684
/* ************** TEXTURE NODES *************** */
729
717
int ntreeTexTagAnimated(struct bNodeTree *ntree);
730
void ntreeTexSetPreviewFlag(int);
731
718
void ntreeTexCheckCyclics(struct bNodeTree *ntree);
732
char* ntreeTexOutputMenu(struct bNodeTree *ntree);
734
720
struct bNodeTreeExec *ntreeTexBeginExecTree(struct bNodeTree *ntree, int use_tree_data);
735
721
void ntreeTexEndExecTree(struct bNodeTreeExec *exec, int use_tree_data);