diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-01 03:06:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-01 03:06:12 +0400 |
commit | a199ae5368fa4a1de36f62dbb214a051b3fbe0c3 (patch) | |
tree | 12c5021085ec3ac707ebc7855112bab3120f268f /source/blender/blenkernel/BKE_node.h | |
parent | a70a48814e16ffd063231577e1a120e1c2629675 (diff) |
style cleanup: whitespace, also add '?' to save over popup since it wasnt totally clear it was a question (user pointed this out, they thought it was just notification and lost their work).
Diffstat (limited to 'source/blender/blenkernel/BKE_node.h')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 178 |
1 files changed, 89 insertions, 89 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 7bd9f75b2dd..93b5e748987 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -88,8 +88,8 @@ typedef struct bNodeSocketTemplate { } bNodeSocketTemplate; typedef void (*NodeSocketButtonFunction)(const struct bContext *C, struct uiBlock *block, - struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock, - const char *name, int x, int y, int width); + struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock, + const char *name, int x, int y, int width); /** Defines a socket type. * Defines the appearance and behavior of a socket in the UI. @@ -301,36 +301,36 @@ struct bNodeType *ntreeGetNodeType(struct bNodeTree *ntree); struct bNodeSocketType *ntreeGetSocketType(int type); struct bNodeTree *ntreeAddTree(const char *name, int type, int nodetype); -void ntreeInitTypes(struct bNodeTree *ntree); +void ntreeInitTypes(struct bNodeTree *ntree); -void ntreeFreeTree(struct bNodeTree *ntree); +void ntreeFreeTree(struct bNodeTree *ntree); struct bNodeTree *ntreeCopyTree(struct bNodeTree *ntree); -void ntreeSwitchID(struct bNodeTree *ntree, struct ID *sce_from, struct ID *sce_to); -void ntreeMakeLocal(struct bNodeTree *ntree); -int ntreeHasType(struct bNodeTree *ntree, int type); +void ntreeSwitchID(struct bNodeTree *ntree, struct ID *sce_from, struct ID *sce_to); +void ntreeMakeLocal(struct bNodeTree *ntree); +int ntreeHasType(struct bNodeTree *ntree, int type); -void ntreeUpdateTree(struct bNodeTree *ntree); +void ntreeUpdateTree(struct bNodeTree *ntree); /* XXX Currently each tree update call does call to ntreeVerifyNodes too. * Some day this should be replaced by a decent depsgraph automatism! */ -void ntreeVerifyNodes(struct Main *main, struct ID *id); +void ntreeVerifyNodes(struct Main *main, struct ID *id); -void ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, int *totnodes); +void ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, int *totnodes); /* XXX old trees handle output flags automatically based on special output node types and last active selection. * new tree types have a per-output socket flag to indicate the final output to use explicitly. */ -void ntreeSetOutput(struct bNodeTree *ntree); -void ntreeInitPreview(struct bNodeTree *, int xsize, int ysize); -void ntreeClearPreview(struct bNodeTree *ntree); +void ntreeSetOutput(struct bNodeTree *ntree); +void ntreeInitPreview(struct bNodeTree *, int xsize, int ysize); +void ntreeClearPreview(struct bNodeTree *ntree); -void ntreeFreeCache(struct bNodeTree *ntree); +void ntreeFreeCache(struct bNodeTree *ntree); -int ntreeNodeExists(struct bNodeTree *ntree, struct bNode *testnode); -int ntreeOutputExists(struct bNode *node, struct bNodeSocket *testsock); +int ntreeNodeExists(struct bNodeTree *ntree, struct bNode *testnode); +int ntreeOutputExists(struct bNode *node, struct bNodeSocket *testsock); struct bNodeTree *ntreeLocalize(struct bNodeTree *ntree); -void ntreeLocalSync(struct bNodeTree *localtree, struct bNodeTree *ntree); -void ntreeLocalMerge(struct bNodeTree *localtree, struct bNodeTree *ntree); +void ntreeLocalSync(struct bNodeTree *localtree, struct bNodeTree *ntree); +void ntreeLocalMerge(struct bNodeTree *localtree, struct bNodeTree *ntree); /* ************** GENERIC API, NODES *************** */ @@ -339,98 +339,98 @@ struct bNodeSocket *nodeInsertSocket(struct bNodeTree *ntree, struct bNode *node void nodeRemoveSocket(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock); void nodeRemoveAllSockets(struct bNodeTree *ntree, struct bNode *node); -void nodeAddToPreview(struct bNode *node, float col[4], int x, int y, int do_manage); +void nodeAddToPreview(struct bNode *node, float col[4], int x, int y, int do_manage); struct bNode *nodeAddNode(struct bNodeTree *ntree, struct bNodeTemplate *ntemp); -void nodeUnlinkNode(struct bNodeTree *ntree, struct bNode *node); -void nodeUniqueName(struct bNodeTree *ntree, struct bNode *node); +void nodeUnlinkNode(struct bNodeTree *ntree, struct bNode *node); +void nodeUniqueName(struct bNodeTree *ntree, struct bNode *node); -void nodeRegisterType(struct bNodeTreeType *ttype, struct bNodeType *ntype); -void nodeMakeDynamicType(struct bNode *node); -int nodeDynamicUnlinkText(struct ID *txtid); +void nodeRegisterType(struct bNodeTreeType *ttype, struct bNodeType *ntype); +void nodeMakeDynamicType(struct bNode *node); +int nodeDynamicUnlinkText(struct ID *txtid); -void nodeFreeNode(struct bNodeTree *ntree, struct bNode *node); +void nodeFreeNode(struct bNodeTree *ntree, struct bNode *node); struct bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node); struct bNodeLink *nodeAddLink(struct bNodeTree *ntree, struct bNode *fromnode, struct bNodeSocket *fromsock, struct bNode *tonode, struct bNodeSocket *tosock); -void nodeRemLink(struct bNodeTree *ntree, struct bNodeLink *link); -void nodeRemSocketLinks(struct bNodeTree *ntree, struct bNodeSocket *sock); -void nodeInternalRelink(struct bNodeTree *ntree, struct bNode *node); +void nodeRemLink(struct bNodeTree *ntree, struct bNodeLink *link); +void nodeRemSocketLinks(struct bNodeTree *ntree, struct bNodeSocket *sock); +void nodeInternalRelink(struct bNodeTree *ntree, struct bNode *node); -void nodeToView(struct bNode *node, float x, float y, float *rx, float *ry); -void nodeFromView(struct bNode *node, float x, float y, float *rx, float *ry); -void nodeAttachNode(struct bNode *node, struct bNode *parent); -void nodeDetachNode(struct bNode *node); +void nodeToView(struct bNode *node, float x, float y, float *rx, float *ry); +void nodeFromView(struct bNode *node, float x, float y, float *rx, float *ry); +void nodeAttachNode(struct bNode *node, struct bNode *parent); +void nodeDetachNode(struct bNode *node); -struct bNode *nodeFindNodebyName(struct bNodeTree *ntree, const char *name); -int nodeFindNode(struct bNodeTree *ntree, struct bNodeSocket *sock, struct bNode **nodep, int *sockindex, int *in_out); +struct bNode *nodeFindNodebyName(struct bNodeTree *ntree, const char *name); +int nodeFindNode(struct bNodeTree *ntree, struct bNodeSocket *sock, struct bNode **nodep, int *sockindex, int *in_out); struct bNodeLink *nodeFindLink(struct bNodeTree *ntree, struct bNodeSocket *from, struct bNodeSocket *to); -int nodeCountSocketLinks(struct bNodeTree *ntree, struct bNodeSocket *sock); +int nodeCountSocketLinks(struct bNodeTree *ntree, struct bNodeSocket *sock); -void nodeSetActive(struct bNodeTree *ntree, struct bNode *node); -struct bNode *nodeGetActive(struct bNodeTree *ntree); -struct bNode *nodeGetActiveID(struct bNodeTree *ntree, short idtype); -int nodeSetActiveID(struct bNodeTree *ntree, short idtype, struct ID *id); -void nodeClearActive(struct bNodeTree *ntree); -void nodeClearActiveID(struct bNodeTree *ntree, short idtype); -struct bNode *nodeGetActiveTexture(struct bNodeTree *ntree); +void nodeSetActive(struct bNodeTree *ntree, struct bNode *node); +struct bNode *nodeGetActive(struct bNodeTree *ntree); +struct bNode *nodeGetActiveID(struct bNodeTree *ntree, short idtype); +int nodeSetActiveID(struct bNodeTree *ntree, short idtype, struct ID *id); +void nodeClearActive(struct bNodeTree *ntree); +void nodeClearActiveID(struct bNodeTree *ntree, short idtype); +struct bNode *nodeGetActiveTexture(struct bNodeTree *ntree); -void nodeUpdate(struct bNodeTree *ntree, struct bNode *node); -int nodeUpdateID(struct bNodeTree *ntree, struct ID *id); +void nodeUpdate(struct bNodeTree *ntree, struct bNode *node); +int nodeUpdateID(struct bNodeTree *ntree, struct ID *id); -void nodeFreePreview(struct bNode *node); +void nodeFreePreview(struct bNode *node); -int nodeSocketIsHidden(struct bNodeSocket *sock); -void nodeSocketSetType(struct bNodeSocket *sock, int type); +int nodeSocketIsHidden(struct bNodeSocket *sock); +void nodeSocketSetType(struct bNodeSocket *sock, int type); /* ************** NODE TYPE ACCESS *************** */ struct bNodeTemplate nodeMakeTemplate(struct bNode *node); -int nodeValid(struct bNodeTree *ntree, struct bNodeTemplate *ntemp); -const char* nodeLabel(struct bNode *node); +int nodeValid(struct bNodeTree *ntree, struct bNodeTemplate *ntemp); +const char *nodeLabel(struct bNode *node); struct bNodeTree *nodeGroupEditGet(struct bNode *node); struct bNodeTree *nodeGroupEditSet(struct bNode *node, int edit); -void nodeGroupEditClear(struct bNode *node); +void nodeGroupEditClear(struct bNode *node); /* Init a new node type struct with default values and callbacks */ -void node_type_base(struct bNodeTreeType *ttype, struct bNodeType *ntype, int type, +void node_type_base(struct bNodeTreeType *ttype, struct bNodeType *ntype, int type, const char *name, short nclass, short flag); -void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs); -void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth); -void node_type_init(struct bNodeType *ntype, void (*initfunc)(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp)); -void node_type_valid(struct bNodeType *ntype, int (*validfunc)(struct bNodeTree *ntree, struct bNodeTemplate *ntemp)); -void node_type_storage(struct bNodeType *ntype, - const char *storagename, - void (*freestoragefunc)(struct bNode *), - void (*copystoragefunc)(struct bNode *, struct bNode *)); -void node_type_label(struct bNodeType *ntype, const char *(*labelfunc)(struct bNode *)); -void node_type_template(struct bNodeType *ntype, struct bNodeTemplate (*templatefunc)(struct bNode *)); -void node_type_update(struct bNodeType *ntype, - void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node), - void (*verifyfunc)(struct bNodeTree *ntree, struct bNode *node, struct ID *id)); -void node_type_tree(struct bNodeType *ntype, - void (*inittreefunc)(struct bNodeTree *), - void (*updatetreefunc)(struct bNodeTree *)); -void node_type_group_edit(struct bNodeType *ntype, - struct bNodeTree *(*group_edit_get)(struct bNode *node), - struct bNodeTree *(*group_edit_set)(struct bNode *node, int edit), - void (*group_edit_clear)(struct bNode *node)); - -void node_type_exec(struct bNodeType *ntype, void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, +void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs); +void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth); +void node_type_init(struct bNodeType *ntype, void (*initfunc)(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp)); +void node_type_valid(struct bNodeType *ntype, int (*validfunc)(struct bNodeTree *ntree, struct bNodeTemplate *ntemp)); +void node_type_storage(struct bNodeType *ntype, + const char *storagename, + void (*freestoragefunc)(struct bNode *), + void (*copystoragefunc)(struct bNode *, struct bNode *)); +void node_type_label(struct bNodeType *ntype, const char *(*labelfunc)(struct bNode *)); +void node_type_template(struct bNodeType *ntype, struct bNodeTemplate (*templatefunc)(struct bNode *)); +void node_type_update(struct bNodeType *ntype, + void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node), + void (*verifyfunc)(struct bNodeTree *ntree, struct bNode *node, struct ID *id)); +void node_type_tree(struct bNodeType *ntype, + void (*inittreefunc)(struct bNodeTree *), + void (*updatetreefunc)(struct bNodeTree *)); +void node_type_group_edit(struct bNodeType *ntype, + struct bNodeTree *(*group_edit_get)(struct bNode *node), + struct bNodeTree *(*group_edit_set)(struct bNode *node, int edit), + void (*group_edit_clear)(struct bNode *node)); + +void node_type_exec(struct bNodeType *ntype, void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **)); -void node_type_exec_new(struct bNodeType *ntype, - void *(*initexecfunc)(struct bNode *node), - void (*freeexecfunc)(struct bNode *node, void *nodedata), - void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata, - struct bNodeStack **, struct bNodeStack **)); -void node_type_internal_connect(struct bNodeType *ntype, ListBase (*internal_connect)(struct bNodeTree *, struct bNode *)); -void node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, +void node_type_exec_new(struct bNodeType *ntype, + void *(*initexecfunc)(struct bNode *node), + void (*freeexecfunc)(struct bNode *node, void *nodedata), + void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata, + struct bNodeStack **, struct bNodeStack **)); +void node_type_internal_connect(struct bNodeType *ntype, ListBase (*internal_connect)(struct bNodeTree *, struct bNode *)); +void node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out)); -void node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node, +void node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out)); -void node_type_compatibility(struct bNodeType *ntype, short compatibility); +void node_type_compatibility(struct bNodeType *ntype, short compatibility); /* ************** COMMON NODES *************** */ @@ -545,16 +545,16 @@ struct ShadeResult; /* API */ struct bNodeTreeExec *ntreeShaderBeginExecTree(struct bNodeTree *ntree, int use_tree_data); -void ntreeShaderEndExecTree(struct bNodeTreeExec *exec, int use_tree_data); -void ntreeShaderExecTree(struct bNodeTree *ntree, struct ShadeInput *shi, struct ShadeResult *shr); -void ntreeShaderGetTexcoMode(struct bNodeTree *ntree, int osa, short *texco, int *mode); -void nodeShaderSynchronizeID(struct bNode *node, int copyto); +void ntreeShaderEndExecTree(struct bNodeTreeExec *exec, int use_tree_data); +void ntreeShaderExecTree(struct bNodeTree *ntree, struct ShadeInput *shi, struct ShadeResult *shr); +void ntreeShaderGetTexcoMode(struct bNodeTree *ntree, int osa, short *texco, int *mode); +void nodeShaderSynchronizeID(struct bNode *node, int copyto); - /* switch material render loop */ +/* switch material render loop */ extern void (*node_shader_lamp_loop)(struct ShadeInput *, struct ShadeResult *); -void set_node_shader_lamp_loop(void (*lamp_loop_func)(struct ShadeInput *, struct ShadeResult *)); +void set_node_shader_lamp_loop(void (*lamp_loop_func)(struct ShadeInput *, struct ShadeResult *)); -void ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMaterial *mat); +void ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMaterial *mat); /* ************** COMPOSITE NODES *************** */ |