Changed node type definitions to use a dynamic list.
authorTon Roosendaal <ton@blender.org>
Mon, 26 Mar 2007 15:07:38 +0000 (15:07 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 26 Mar 2007 15:07:38 +0000 (15:07 +0000)
This will allow python or plugin defined nodes to work as well.
(And fixes compile issues with MSVC in yesterdays commit for nodes)

Code provided by Nathan L.
Fixes in his code:
- free_nodesystem() was called too late (after guarded alloc was closed)
- free_nodesystem() was freeing nodes that were not malloced even
- free_nodesystem was using free, not freeN :)
- the typedefs needed to be malloced yes, to allow duplicate nodes like
  group but also for dynamic nodes.

64 files changed:
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/intern/node.c
source/blender/makesdna/DNA_node_types.h
source/blender/nodes/CMP_node.h
source/blender/nodes/SHD_node.h
source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c
source/blender/nodes/intern/CMP_nodes/CMP_blur.c
source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c
source/blender/nodes/intern/CMP_nodes/CMP_composite.c
source/blender/nodes/intern/CMP_nodes/CMP_curves.c
source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
source/blender/nodes/intern/CMP_nodes/CMP_dilate.c
source/blender/nodes/intern/CMP_nodes/CMP_displace.c
source/blender/nodes/intern/CMP_nodes/CMP_filter.c
source/blender/nodes/intern/CMP_nodes/CMP_flip.c
source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c
source/blender/nodes/intern/CMP_nodes/CMP_idMask.c
source/blender/nodes/intern/CMP_nodes/CMP_image.c
source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
source/blender/nodes/intern/CMP_nodes/CMP_mapUV.c
source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c
source/blender/nodes/intern/CMP_nodes/CMP_math.c
source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c
source/blender/nodes/intern/CMP_nodes/CMP_normal.c
source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c
source/blender/nodes/intern/CMP_nodes/CMP_rgb.c
source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
source/blender/nodes/intern/CMP_nodes/CMP_scale.c
source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c
source/blender/nodes/intern/CMP_nodes/CMP_sepcombRGBA.c
source/blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c
source/blender/nodes/intern/CMP_nodes/CMP_sepcombYUVA.c
source/blender/nodes/intern/CMP_nodes/CMP_setalpha.c
source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c
source/blender/nodes/intern/CMP_nodes/CMP_texture.c
source/blender/nodes/intern/CMP_nodes/CMP_translate.c
source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c
source/blender/nodes/intern/CMP_nodes/CMP_value.c
source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c
source/blender/nodes/intern/CMP_nodes/CMP_viewer.c
source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c
source/blender/nodes/intern/SHD_nodes/SHD_camera.c
source/blender/nodes/intern/SHD_nodes/SHD_curves.c
source/blender/nodes/intern/SHD_nodes/SHD_geom.c
source/blender/nodes/intern/SHD_nodes/SHD_mapping.c
source/blender/nodes/intern/SHD_nodes/SHD_material.c
source/blender/nodes/intern/SHD_nodes/SHD_math.c
source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c
source/blender/nodes/intern/SHD_nodes/SHD_normal.c
source/blender/nodes/intern/SHD_nodes/SHD_output.c
source/blender/nodes/intern/SHD_nodes/SHD_rgb.c
source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c
source/blender/nodes/intern/SHD_nodes/SHD_texture.c
source/blender/nodes/intern/SHD_nodes/SHD_valToRgb.c
source/blender/nodes/intern/SHD_nodes/SHD_value.c
source/blender/nodes/intern/SHD_nodes/SHD_vectMath.c
source/blender/src/drawnode.c
source/blender/src/header_node.c
source/blender/src/toolbox.c
source/blender/src/usiblender.c
source/creator/creator.c

index 616bca078f5e578c4bfe54fd92b1f26a63ded576..3da04b211709b78bca5b15e432277f60bb7dea1b 100644 (file)
@@ -66,6 +66,7 @@ typedef struct bNodeSocketType {
 } bNodeSocketType;
 
 typedef struct bNodeType {
+       void *next,*prev;
        int type;
        char *name;
        float width, minwidth, maxwidth;
@@ -102,6 +103,7 @@ void                        ntreeVerifyTypes(struct bNodeTree *ntree);
 
 struct bNodeTree *ntreeAddTree(int type);
 void                   ntreeInitTypes(struct bNodeTree *ntree);
+
 void                   ntreeMakeOwnType(struct bNodeTree *ntree);
 void                   ntreeFreeTree(struct bNodeTree *ntree);
 struct bNodeTree *ntreeCopyTree(struct bNodeTree *ntree, int internal_select);
@@ -196,7 +198,7 @@ struct ShadeResult;
 #define SH_NODE_MAT_NEG    4
 
 /* the type definitions array */
-static bNodeType *node_all_shaders[];
+extern struct ListBase node_all_shaders;
 
 /* API */
 
@@ -293,7 +295,7 @@ void                        set_node_shader_lamp_loop(void (*lamp_loop_func)(struct ShadeInput *, str
 
 
 /* the type definitions array */
-static bNodeType* node_all_composit[];
+extern struct ListBase node_all_composit;
 
 /* API */
 struct CompBuf;
@@ -304,4 +306,7 @@ void ntreeCompositForceHidden(struct bNodeTree *ntree);
 
 void free_compbuf(struct CompBuf *cbuf); /* internal...*/
 
+void init_nodesystem(void);
+void free_nodesystem(void);
+
 #endif
index 84e88ee98f35437a9e0186fb05e551df62077b98..4ec678e363e0fe6a321ac817e4c73389f83bed52 100644 (file)
 /* not very important, but the stack solver likes to know a maximum */
 #define MAX_SOCKET     64
 
+static ListBase empty_list = {NULL, NULL};
+ListBase node_all_composit = {NULL, NULL};
+ListBase node_all_shaders = {NULL, NULL};
+
 /* ************** Type stuff **********  */
 
 static bNodeType *node_get_type(bNodeTree *ntree, int type, bNodeTree *ngroup)
@@ -77,12 +81,12 @@ static bNodeType *node_get_type(bNodeTree *ntree, int type, bNodeTree *ngroup)
                return NULL;
        }
        else {
-               bNodeType **typedefs= ntree->alltypes;
-               
-               while( *typedefs && (*typedefs)->type!=type)
-                       typedefs++;
+               bNodeType *ntype = ntree->alltypes.first;
+               for(; ntype; ntype= ntype->next)
+                       if(ntype->type==type)
+                               return ntype;
                
-               return *typedefs;
+               return NULL;
        }
 }
 
@@ -95,7 +99,7 @@ void ntreeInitTypes(bNodeTree *ntree)
        else if(ntree->type==NTREE_COMPOSIT)
                ntree->alltypes= node_all_composit;
        else {
-               ntree->alltypes= NULL;
+               ntree->alltypes= empty_list;
                printf("Error: no type definitions for nodes\n");
        }
        
@@ -223,10 +227,9 @@ void ntreeVerifyTypes(bNodeTree *ntree)
 {
        bNode *node;
        
-       /* commented out, in linux a 2nd initialize on a Scene ntree from a lib crashes... */
-/*     if((ntree->init & NTREE_TYPE_INIT)==0) */
-               ntreeInitTypes(ntree);
-       
+       /* if((ntree->init & NTREE_TYPE_INIT)==0) */
+       ntreeInitTypes(ntree);
+
        /* check inputs and outputs, and remove or insert them */
        for(node= ntree->nodes.first; node; node= node->next)
                nodeVerifyType(ntree, node);
@@ -236,6 +239,7 @@ void ntreeVerifyTypes(bNodeTree *ntree)
 /* ************** Group stuff ********** */
 
 bNodeType node_group_typeinfo= {
+       /* next,prev   */   NULL, NULL,
        /* type code   */       NODE_GROUP,
        /* name        */       "Group",
        /* width+range */       120, 60, 200,
@@ -244,7 +248,8 @@ bNodeType node_group_typeinfo= {
        /* output sock */       NULL,
        /* storage     */       "",
        /* execfunc    */       NULL,
-       
+       /* butfunc         */   NULL,
+       /* initfunc    */   NULL
 };
 
 /* tag internal sockets */
@@ -345,7 +350,7 @@ void ntreeMakeOwnType(bNodeTree *ngroup)
        
        /* make own type struct */
        ngroup->owntype= MEM_mallocN(sizeof(bNodeType), "group type");
-       *ngroup->owntype= node_group_typeinfo;
+       *ngroup->owntype= node_group_typeinfo; /* copy data, for init */
        
        /* input type arrays */
        if(totin) {
@@ -863,6 +868,8 @@ bNodeTree *ntreeAddTree(int type)
 {
        bNodeTree *ntree= MEM_callocN(sizeof(bNodeTree), "new node tree");
        ntree->type= type;
+       ntree->alltypes.first = NULL;
+       ntree->alltypes.last = NULL;
        
        ntreeInitTypes(ntree);
        return ntree;
@@ -2296,3 +2303,122 @@ void ntreeCompositTagGenerators(bNodeTree *ntree)
    }
 }
 
+/* ************* node definition init ********** */
+
+static bNodeType *is_nodetype_registered(ListBase *typelist, int type) 
+{
+       bNodeType *ntype= typelist->first;
+       
+       for(;ntype; ntype= ntype->next )
+               if(ntype->type==type)
+                       return ntype;
+       
+       return NULL;
+}
+
+/* type can be from a static array, we make copy for duplicate types (like group) */
+void nodeRegisterType(ListBase *typelist, const bNodeType *ntype) 
+{
+       bNodeType *found= is_nodetype_registered(typelist, ntype->type);
+       
+       if(found==NULL) {
+               bNodeType *ntypen= MEM_mallocN(sizeof(bNodeType), "node type");
+               *ntypen= *ntype;
+               BLI_addtail(typelist, ntypen);
+       }
+}
+
+static void registerCompositNodes(ListBase *ntypelist)
+{
+       nodeRegisterType(ntypelist, &node_group_typeinfo);
+       nodeRegisterType(ntypelist, &cmp_node_rlayers);
+       nodeRegisterType(ntypelist, &cmp_node_image);
+       nodeRegisterType(ntypelist, &cmp_node_texture);
+       nodeRegisterType(ntypelist, &cmp_node_value);
+       nodeRegisterType(ntypelist, &cmp_node_rgb);
+       nodeRegisterType(ntypelist, &cmp_node_curve_time);
+       
+       nodeRegisterType(ntypelist, &cmp_node_composite);
+       nodeRegisterType(ntypelist, &cmp_node_viewer);
+       nodeRegisterType(ntypelist, &cmp_node_splitviewer);
+       nodeRegisterType(ntypelist, &cmp_node_output_file);
+       
+       nodeRegisterType(ntypelist, &cmp_node_curve_rgb);
+       nodeRegisterType(ntypelist, &cmp_node_mix_rgb);
+       nodeRegisterType(ntypelist, &cmp_node_hue_sat);
+       nodeRegisterType(ntypelist, &cmp_node_alphaover);
+       nodeRegisterType(ntypelist, &cmp_node_zcombine);
+       
+       nodeRegisterType(ntypelist, &cmp_node_normal);
+       nodeRegisterType(ntypelist, &cmp_node_curve_vec);
+       nodeRegisterType(ntypelist, &cmp_node_map_value);
+
+       nodeRegisterType(ntypelist, &cmp_node_filter);
+       nodeRegisterType(ntypelist, &cmp_node_blur);
+       nodeRegisterType(ntypelist, &cmp_node_vecblur);
+       nodeRegisterType(ntypelist, &cmp_node_dilateerode);
+       nodeRegisterType(ntypelist, &cmp_node_defocus);
+
+       nodeRegisterType(ntypelist, &cmp_node_valtorgb);
+       nodeRegisterType(ntypelist, &cmp_node_rgbtobw);
+       nodeRegisterType(ntypelist, &cmp_node_setalpha);
+       nodeRegisterType(ntypelist, &cmp_node_idmask);
+       nodeRegisterType(ntypelist, &cmp_node_math);
+       nodeRegisterType(ntypelist, &cmp_node_seprgba);
+       nodeRegisterType(ntypelist, &cmp_node_combrgba);
+       nodeRegisterType(ntypelist, &cmp_node_sephsva);
+       nodeRegisterType(ntypelist, &cmp_node_combhsva);
+       nodeRegisterType(ntypelist, &cmp_node_sepyuva);
+       nodeRegisterType(ntypelist, &cmp_node_combyuva);
+       nodeRegisterType(ntypelist, &cmp_node_sepycca);
+       nodeRegisterType(ntypelist, &cmp_node_combycca);
+               
+       nodeRegisterType(ntypelist, &cmp_node_diff_matte);
+       nodeRegisterType(ntypelist, &cmp_node_chroma);
+       nodeRegisterType(ntypelist, &cmp_node_channel_matte);
+       nodeRegisterType(ntypelist, &cmp_node_color_spill);
+       nodeRegisterType(ntypelist, &cmp_node_luma_matte);
+       
+       nodeRegisterType(ntypelist, &cmp_node_translate);
+       nodeRegisterType(ntypelist, &cmp_node_rotate);
+       nodeRegisterType(ntypelist, &cmp_node_scale);
+       nodeRegisterType(ntypelist, &cmp_node_flip);
+       nodeRegisterType(ntypelist, &cmp_node_displace);
+       nodeRegisterType(ntypelist, &cmp_node_mapuv);
+}
+
+static void registerShaderNodes(ListBase *ntypelist) 
+{
+       nodeRegisterType(ntypelist, &node_group_typeinfo);
+       nodeRegisterType(ntypelist, &sh_node_output);
+       nodeRegisterType(ntypelist, &sh_node_mix_rgb);
+       nodeRegisterType(ntypelist, &sh_node_valtorgb);
+       nodeRegisterType(ntypelist, &sh_node_rgbtobw);
+       nodeRegisterType(ntypelist, &sh_node_normal);
+       nodeRegisterType(ntypelist, &sh_node_geom);
+       nodeRegisterType(ntypelist, &sh_node_mapping);
+       nodeRegisterType(ntypelist, &sh_node_curve_vec);
+       nodeRegisterType(ntypelist, &sh_node_curve_rgb);
+       nodeRegisterType(ntypelist, &sh_node_math);
+       nodeRegisterType(ntypelist, &sh_node_vect_math);
+       nodeRegisterType(ntypelist, &sh_node_squeeze);
+       nodeRegisterType(ntypelist, &sh_node_camera);
+       nodeRegisterType(ntypelist, &sh_node_material);
+       nodeRegisterType(ntypelist, &sh_node_value);
+       nodeRegisterType(ntypelist, &sh_node_rgb);
+       nodeRegisterType(ntypelist, &sh_node_texture);
+}
+
+void init_nodesystem(void) 
+{
+       registerCompositNodes(&node_all_composit);
+       registerShaderNodes(&node_all_shaders);
+}
+
+void free_nodesystem(void) 
+{
+       BLI_freelistN(&node_all_composit);
+       BLI_freelistN(&node_all_shaders);
+}
+
+
index 27765b2ff34a2f8b7f5dde08fead82987293375b..63ead419766440d81ce2ab367c2c43715117e896 100644 (file)
@@ -34,7 +34,7 @@
 #include "DNA_vec_types.h"
 #include "DNA_listBase.h"
 
-
+struct ListBase;
 struct SpaceNode;
 struct bNodeLink;
 struct bNodeType;
@@ -162,10 +162,11 @@ typedef struct bNodeTree {
        
        int type, init;                                 /* set init on fileread */
        int stacksize;                                  /* amount of elements in stack */
-       int cur_index;                                  /* sockets in groups have unique identifiers, adding new sockets always will increase this counter */
-       struct bNodeType **alltypes;    /* type definitions, set on fileread, no read/write */
+       int cur_index;                                  /* sockets in groups have unique identifiers, adding new sockets always 
+                                                                          will increase this counter */
+       ListBase alltypes;                              /* type definitions */
        struct bNodeType *owntype;              /* for groups or dynamic trees, no read/write */
-       
+
        /* callbacks */
        void (*timecursor)(int nr);
        void (*stats_draw)(char *str);
index b35c2cba18f23e0319ea0ce05c8ff7962e24a258..8335538e448539250575caff256d3e24a7a1d39d 100644 (file)
@@ -91,67 +91,8 @@ extern bNodeType cmp_node_rotate;
 extern bNodeType cmp_node_scale;
 extern bNodeType cmp_node_flip;
 extern bNodeType cmp_node_displace;
-extern bNodeType cmp_node_mapuv; 
+extern bNodeType cmp_node_mapuv;
 
-static bNodeType* node_all_composit[]= {
-   &node_group_typeinfo,
-
-      &cmp_node_rlayers,
-      &cmp_node_image,
-      &cmp_node_texture,
-      &cmp_node_value,
-      &cmp_node_rgb,
-      &cmp_node_curve_time,
-
-      &cmp_node_composite,
-      &cmp_node_viewer,
-      &cmp_node_splitviewer,
-      &cmp_node_output_file,
-
-      &cmp_node_curve_rgb,
-      &cmp_node_mix_rgb,
-      &cmp_node_hue_sat,
-      &cmp_node_alphaover,
-      &cmp_node_zcombine,
-
-      &cmp_node_normal,
-      &cmp_node_curve_vec,
-      &cmp_node_map_value,
-
-      &cmp_node_filter,
-      &cmp_node_blur,
-      &cmp_node_vecblur,
-      &cmp_node_dilateerode,
-      &cmp_node_defocus,
-
-      &cmp_node_valtorgb,
-      &cmp_node_rgbtobw,       
-      &cmp_node_setalpha,
-      &cmp_node_idmask,
-      &cmp_node_math,
-      &cmp_node_seprgba,
-      &cmp_node_combrgba,
-      &cmp_node_sephsva,
-      &cmp_node_combhsva,
-      &cmp_node_sepyuva,
-      &cmp_node_combyuva,
-      &cmp_node_sepycca,
-      &cmp_node_combycca,
-
-      &cmp_node_diff_matte,
-      &cmp_node_chroma,
-      &cmp_node_channel_matte,
-      &cmp_node_color_spill,
-      &cmp_node_luma_matte,
-
-      &cmp_node_translate,
-      &cmp_node_rotate,
-      &cmp_node_scale,
-      &cmp_node_flip,
-      &cmp_node_displace,
-      &cmp_node_mapuv,
+#endif
 
-      NULL
-};
 
-#endif
index 9c4a3421e5eb106c3fc3cba0a29305dadf19e01c..b443a39624bf38ad19670f4eb945ec9e7da9d160 100644 (file)
@@ -57,30 +57,6 @@ extern bNodeType sh_node_math;
 extern bNodeType sh_node_vect_math;
 extern bNodeType sh_node_squeeze;
 
-static bNodeType* node_all_shaders[]= {
-      &node_group_typeinfo,
-      &sh_node_output,
-      &sh_node_material,
-      &sh_node_camera,
-      &sh_node_value,
-      &sh_node_rgb,
-      &sh_node_mix_rgb,
-      &sh_node_valtorgb,
-      &sh_node_rgbtobw,
-      &sh_node_texture,
-      &sh_node_normal,
-      &sh_node_geom,
-      &sh_node_mapping,
-      &sh_node_curve_vec,
-      &sh_node_curve_rgb,
-      &sh_node_math,
-      &sh_node_vect_math,
-      &sh_node_squeeze,
-      NULL
-};
-
-
-
 #endif
 
 
index 0ef0f096e899dc6f520cc54bce7e6b6fc27025e5..16ed447921ac7c2311551dae19595bad3371f8ad 100644 (file)
@@ -108,6 +108,7 @@ static void node_composit_exec_alphaover(void *data, bNode *node, bNodeStack **i
 }
 
 bNodeType cmp_node_alphaover= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_ALPHAOVER,
        /* name        */       "AlphaOver",
        /* width+range */       80, 40, 120,
index 460f2b6b5274569b9b587a92eff72f65b9f90444..7c081ec5210dc7755acec693a7e0aef70e3960a7 100644 (file)
@@ -617,6 +617,7 @@ static void node_composit_init_blur(bNode* node)
 }
 
 bNodeType cmp_node_blur= {
+       /* *next,*prev */       NULL, NULL,
    /* type code   */   CMP_NODE_BLUR,
    /* name        */   "Blur",
    /* width+range */   120, 80, 200,
index b659ad0bc875b377c4aa0d9e89309f014383882d..0a833e52e35b186249a1af9cae485b43ba5b30ea 100644 (file)
@@ -190,6 +190,7 @@ static void node_composit_init_channel_matte(bNode *node)
 }
 
 bNodeType cmp_node_channel_matte={
+       /* *next,*prev */       NULL, NULL,
    /* type code   */       CMP_NODE_CHANNEL_MATTE,
    /* name        */       "Channel Key",
    /* width+range */       200, 80, 250,
index 6080d9782b6a6f0fbd44d35ae5130364e00c5f5a..e1eb4420066da16ae64be87e546b0ea411f789d1 100644 (file)
@@ -173,6 +173,7 @@ static void node_composit_init_chroma_matte(bNode *node)
 };
 
 bNodeType cmp_node_chroma={
+       /* *next,*prev */       NULL, NULL,
    /* type code   */       CMP_NODE_CHROMA,
    /* name        */       "Chroma Key",
    /* width+range */       200, 80, 300,
index 44dd6f8b6408c984cc65fcce885f52a1ee19f45d..3c2054e400dbd5482de1132a13c6d7e70dc1b66e 100644 (file)
@@ -126,6 +126,7 @@ static void node_composit_init_color_spill(bNode *node)
 };
 
 bNodeType cmp_node_color_spill={
+       /* *next,*prev */       NULL, NULL,
    /* type code   */       CMP_NODE_COLOR_SPILL,
    /* name        */       "Color Spill",
    /* width+range */       140, 80, 200,
index fe0491a8734cc7c1030dd5de480c5e4d5f59cf17..317715278dedab075b4b88ad1b2af801d0131a33 100644 (file)
@@ -88,6 +88,7 @@ static void node_composit_exec_composite(void *data, bNode *node, bNodeStack **i
 }
 
 bNodeType cmp_node_composite= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_COMPOSITE,
        /* name        */       "Composite",
        /* width+range */       80, 60, 200,
index a7b81d425aaa983cfe6855c827274541b47b937d..7f0310de9aabde05abff41d58e7db159328c6f3d 100644 (file)
@@ -59,6 +59,7 @@ static void node_composit_init_curves_time(bNode* node)
 }
 
 bNodeType cmp_node_curve_time= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_TIME,
        /* name        */       "Time",
        /* width+range */       140, 100, 320,
@@ -98,6 +99,7 @@ static void node_composit_init_curve_vec(bNode* node)
 };
 
 bNodeType cmp_node_curve_vec= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_CURVE_VEC,
        /* name        */       "Vector Curves",
        /* width+range */       200, 140, 320,
@@ -180,6 +182,7 @@ static void node_composit_init_curve_rgb(bNode* node)
 };
 
 bNodeType cmp_node_curve_rgb= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_CURVE_RGB,
        /* name        */       "RGB Curves",
        /* width+range */       200, 140, 320,
index 2c705acbab10d7483b9801f99409cf0a29acb88d..454f42324fc0e49686fa9dfb7cc2ecc6b910f071 100644 (file)
@@ -806,6 +806,7 @@ static void node_composit_init_defocus(bNode* node)
 };
 
 bNodeType cmp_node_defocus = {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_DEFOCUS,
        /* name        */       "Defocus",
        /* width+range */       150, 120, 200,
index d476ac215b5edc6fe09c8774618a09eb0c3fa589..1af5b943dbc90aed504273796ca0376475c4b8ff 100644 (file)
@@ -198,6 +198,7 @@ static void node_composit_init_diff_matte(bNode *node)
 }
 
 bNodeType cmp_node_diff_matte={
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_DIFF_MATTE,
        /* name        */       "Difference Key",
        /* width+range */       200, 80, 250,
index b4902fe395e402b12a3ecee671dab6cf9f35e6a1..bb79a4c8f0d0624cc97aa1a5a0c7b0dcfadb9be5 100644 (file)
@@ -144,6 +144,7 @@ static void node_composit_exec_dilateerode(void *data, bNode *node, bNodeStack *
 }
 
 bNodeType cmp_node_dilateerode= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_DILATEERODE,
        /* name        */       "Dilate/Erode",
        /* width+range */       130, 100, 320,
index 760d1107d4c15574091895135fd994fb1379e8e9..a87394815a208d8b2c1b343bc2c3871d7d6d76dd 100644 (file)
@@ -145,6 +145,7 @@ static void node_composit_exec_displace(void *data, bNode *node, bNodeStack **in
 }
 
 bNodeType cmp_node_displace= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_DISPLACE,
        /* name        */       "Displace",
        /* width+range */       140, 100, 320,
index 408420a399c078b4645de31f5a10bfb2d760176c..7f578c56927b3f1a03fb85f404f7b61d3a7191c3 100644 (file)
@@ -215,6 +215,7 @@ static void node_composit_exec_filter(void *data, bNode *node, bNodeStack **in,
 
 
 bNodeType cmp_node_filter= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_FILTER,
        /* name        */       "Filter",
        /* width+range */       80, 40, 120,
index 119f7542f2ca67df3f9465e07b54191241d7da1d..f44b890148c97563a56cfb9ed7091528020fb290 100644 (file)
@@ -86,6 +86,7 @@ static void node_composit_exec_flip(void *data, bNode *node, bNodeStack **in, bN
 }
 
 bNodeType cmp_node_flip= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_FLIP,
        /* name        */       "Flip",
        /* width+range */       140, 100, 320,
index fc4b0b1356135b13e1bb202124298e7dfb325bdb..d4258bdeeb3f855c9d06876574f597ac7aa489b9 100644 (file)
@@ -102,6 +102,7 @@ static void node_composit_init_hue_sat(bNode* node)
 }
 
 bNodeType cmp_node_hue_sat= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_HUE_SAT,
        /* name        */       "Hue Saturation Value",
        /* width+range */       150, 80, 250,
index 79d11907bd3a956f679bff89898844dc6e8fe1f3..d4e6b065ba82801004c87fb977443e8cbeca7a42 100644 (file)
@@ -85,6 +85,7 @@ static void node_composit_exec_idmask(void *data, bNode *node, bNodeStack **in,
 
 
 bNodeType cmp_node_idmask= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_ID_MASK,
        /* name        */       "ID Mask",
        /* width+range */       140, 100, 320,
index b9ae376992d77c8a3134f225e24672302c6d0ee4..29845d8835cafe83e64b2cfa1ec1597a25fb0b67 100644 (file)
@@ -211,6 +211,7 @@ static void node_composit_init_image(bNode* node)
 }
 
 bNodeType cmp_node_image= {
+       /* *next,*prev */       NULL, NULL,
    /* type code   */   CMP_NODE_IMAGE,
    /* name        */   "Image",
    /* width+range */   120, 80, 300,
@@ -328,6 +329,7 @@ static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **in,
 
 
 bNodeType cmp_node_rlayers= {
+       /* *next,*prev */       NULL, NULL,
    /* type code   */   CMP_NODE_R_LAYERS,
    /* name        */   "Render Layers",
    /* width+range */   150, 100, 300,
index 0a69f2e9056466c1b331e4edf33a42e89cfb7ce3..d909e47538f7113314c4dd5bf84813f7e408bef4 100644 (file)
@@ -104,6 +104,7 @@ static void node_composit_init_luma_matte(bNode *node)
 };
 
 bNodeType cmp_node_luma_matte={
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_LUMA_MATTE,
        /* name        */       "Luminance Key",
        /* width+range */       200, 80, 250,
index 172df387dbd31f6f8bfee7ae1cbc7835930c360f..4c7b4402ba75bee3a33f7a1dc5a63e9a62cac7bf 100644 (file)
@@ -130,6 +130,7 @@ static void node_composit_exec_mapuv(void *data, bNode *node, bNodeStack **in, b
 }
 
 bNodeType cmp_node_mapuv= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_MAP_UV,
        /* name        */       "Map UV",
        /* width+range */       140, 100, 320,
index 427aa01ab0ab30ed94706c7e7fef92a656f0bef4..97faa9488d115a9e601d99485d3c1f5a08dfee39 100644 (file)
@@ -80,6 +80,7 @@ static void node_composit_init_map_value(bNode* node)
 }
 
 bNodeType cmp_node_map_value= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_MAP_VALUE,
        /* name        */       "Map Value",
        /* width+range */       100, 60, 150,
index d8bb1cebbaa04422ba1bd1a5793bba0cec1c0ecf..7515dff166e685b894fd77568c6869ab01ef4e1f 100644 (file)
@@ -159,6 +159,7 @@ static void node_composit_exec_math(void *data, bNode *node, bNodeStack **in, bN
 }
 
 bNodeType cmp_node_math= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_MATH,
        /* name        */       "Math",
        /* width+range */       120, 110, 160,
index 662b8390e18a0c9f3d74377e0973976454fe8741..6a0cd63d1f1714cf4adcffb9b1f1e20d34df9cd1 100644 (file)
@@ -78,6 +78,7 @@ static void node_composit_exec_mix_rgb(void *data, bNode *node, bNodeStack **in,
 
 /* custom1 = mix type */
 bNodeType cmp_node_mix_rgb= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_MIX_RGB,
        /* name        */       "Mix",
        /* width+range */       80, 60, 120,
index bf103f34dee0e0ba8d7666580158297d374c4e2a..d1b3aa5f37f7b0acac90b18c5582c40db52a5937 100644 (file)
@@ -78,6 +78,7 @@ static void node_composit_exec_normal(void *data, bNode *node, bNodeStack **in,
 }
 
 bNodeType cmp_node_normal= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_NORMAL,
        /* name        */       "Normal",
        /* width+range */       100, 60, 200,
index 0bec7e2721169bd381f8daf4542fe08881790e0c..94b6772cf41e29fbc1098bffc7dd7f5431473923 100644 (file)
@@ -92,6 +92,7 @@ static void node_composit_init_output_file(bNode *node)
 };
 
 bNodeType cmp_node_output_file= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_OUTPUT_FILE,
        /* name        */       "File Output",
        /* width+range */       140, 80, 300,
index f2766d9224cb154ab0f4383782a7614b224cea9c..1c690ef0113ef61eb9153e1de14b5550689612e2 100644 (file)
@@ -44,6 +44,7 @@ static void node_composit_exec_rgb(void *data, bNode *node, bNodeStack **in, bNo
 }
 
 bNodeType cmp_node_rgb= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_RGB,
        /* name        */       "RGB",
        /* width+range */       100, 60, 140,
index a3576a014451dc4f5e114ecb8015e39e4f333687..c09fe56b28f3b16da65bfac2a36b651962412fc3 100644 (file)
@@ -133,6 +133,7 @@ static void node_composit_exec_rotate(void *data, bNode *node, bNodeStack **in,
 }
 
 bNodeType cmp_node_rotate= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_ROTATE,
        /* name        */       "Rotate",
        /* width+range */       140, 100, 320,
index 99f5eb458ce812bb9130cae1c4881dcda3db0240..244a5d0685c04c1373b7411a0bfb9df68d65c89f 100644 (file)
@@ -102,6 +102,7 @@ static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, b
 };
 
 bNodeType cmp_node_scale= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_SCALE,
        /* name        */       "Scale",
        /* width+range */       140, 100, 320,
index b3cf20f5a437afddff38aa29924b5d6d93bd48a8..50eedcaabe43ba87fa5c74259e155dc18f839429 100644 (file)
@@ -97,6 +97,7 @@ static void node_composit_exec_sephsva(void *data, bNode *node, bNodeStack **in,
 }
 
 bNodeType cmp_node_sephsva= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_SEPHSVA,
        /* name        */       "Separate HSVA",
        /* width+range */       80, 40, 140,
@@ -168,6 +169,7 @@ static void node_composit_exec_combhsva(void *data, bNode *node, bNodeStack **in
 }
 
 bNodeType cmp_node_combhsva= {
+       /* *next,*prev */       NULL, NULL,
    /* type code   */   CMP_NODE_COMBHSVA,
    /* name        */   "Combine HSVA",
    /* width+range */   80, 40, 140,
index 7a323b503f02aabc46b1aebd3647300144905770..50643cd9c435bf3c92f686ac6737fc90796cd9c8 100644 (file)
@@ -75,6 +75,7 @@ static void node_composit_exec_seprgba(void *data, bNode *node, bNodeStack **in,
 }
 
 bNodeType cmp_node_seprgba= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_SEPRGBA,
        /* name        */       "Separate RGBA",
        /* width+range */       80, 40, 140,
@@ -144,6 +145,7 @@ static void node_composit_exec_combrgba(void *data, bNode *node, bNodeStack **in
 }
 
 bNodeType cmp_node_combrgba= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_COMBRGBA,
        /* name        */       "Combine RGBA",
        /* width+range */       80, 40, 140,
index 108042a16b8113277326be43c41ac2b972151268..342a8e441149d40eb619eb61ca25cf451c9d9d3e 100644 (file)
@@ -96,6 +96,7 @@ static void node_composit_exec_sepycca(void *data, bNode *node, bNodeStack **in,
 }
 
 bNodeType cmp_node_sepycca= {
+       /* *next,*prev */ NULL, NULL,
        /* type code   */ CMP_NODE_SEPYCCA,
        /* name        */ "Separate YCbCrA",
        /* width+range */ 80, 40, 140,
@@ -174,6 +175,7 @@ static void node_composit_exec_combycca(void *data, bNode *node, bNodeStack **in
 }
 
 bNodeType cmp_node_combycca= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_COMBYCCA,
        /* name        */       "Combine YCbCrA",
        /* width+range */       80, 40, 140,
index 48a42d16a942ac2bd7dced2cec6d3a986eddf4b0..ec171b638115773d76b4427e17f75882cf55d4db 100644 (file)
@@ -97,6 +97,7 @@ static void node_composit_exec_sepyuva(void *data, bNode *node, bNodeStack **in,
 }
 
 bNodeType cmp_node_sepyuva= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */ CMP_NODE_SEPYUVA,
        /* name        */ "Separate YUVA",
        /* width+range */ 80, 40, 140,
@@ -168,6 +169,7 @@ static void node_composit_exec_combyuva(void *data, bNode *node, bNodeStack **in
 }
 
 bNodeType cmp_node_combyuva= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_COMBYUVA,
        /* name        */       "Combine YUVA",
        /* width+range */       80, 40, 140,
index ecc3fb99f4106ebf7dab7d2bac556ea8c08f4531..79619dafec5965f06794a8e5f1263d378a0118bf 100644 (file)
@@ -71,6 +71,7 @@ static void node_composit_exec_setalpha(void *data, bNode *node, bNodeStack **in
 }
 
 bNodeType cmp_node_setalpha= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_SETALPHA,
        /* name        */       "Set Alpha",
        /* width+range */       120, 40, 140,
index 3e6142a65347f50e06839a341eb0fa9f241c6678..572ed53b0f78502e4faa8034de6a275a93c656fa 100644 (file)
@@ -143,6 +143,7 @@ static void node_composit_init_splitviewer(bNode* node)
 }
 
 bNodeType cmp_node_splitviewer= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_SPLITVIEWER,
        /* name        */       "SplitViewer",
        /* width+range */       140, 100, 320,
index 551da1e480bdbe79d3dccdd8fd9ad2443e4e86c6..eec7ea379fa6917cb322f4d05d24959899c37f08 100644 (file)
@@ -118,6 +118,7 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
 }
 
 bNodeType cmp_node_texture= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_TEXTURE,
        /* name        */       "Texture",
        /* width+range */       120, 80, 240,
index 2ea91b603d8366cff76faf86b061f0849d64f86d..56d5c114eae394a4aaaa3daad00951c82f27396b 100644 (file)
@@ -57,6 +57,7 @@ static void node_composit_exec_translate(void *data, bNode *node, bNodeStack **i
 }
 
 bNodeType cmp_node_translate= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_TRANSLATE,
        /* name        */       "Translate",
        /* width+range */       140, 100, 320,
index d30bf42d47864eefbd306c8a44274fa3cef07e51..d35c347d0dbc5e4e8c6cfcb2fa9209610b547cfb 100644 (file)
@@ -81,6 +81,7 @@ static void node_composit_init_valtorgb(bNode* node)
 }
 
 bNodeType cmp_node_valtorgb= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_VALTORGB,
        /* name        */       "ColorRamp",
        /* width+range */       240, 200, 300,
@@ -134,6 +135,7 @@ static void node_composit_exec_rgbtobw(void *data, bNode *node, bNodeStack **in,
 }
 
 bNodeType cmp_node_rgbtobw= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_RGBTOBW,
        /* name        */       "RGB to BW",
        /* width+range */       80, 40, 120,
index 578a07c91ae92f11f97379aa177e669281dea5b7..8681fce6e1b5729848b3bb5669d4c788f038c0b8 100644 (file)
@@ -43,6 +43,7 @@ static void node_composit_exec_value(void *data, bNode *node, bNodeStack **in, b
 }
 
 bNodeType cmp_node_value= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_VALUE,
        /* name        */       "Value",
        /* width+range */       80, 40, 120,
index ebaf4d709155cc431649ca7b9e25133872ced685..81dcc080bccd309a39b07feeb17d23da24185ea4 100644 (file)
@@ -117,6 +117,7 @@ static void node_composit_init_vecblur(bNode* node)
 
 /* custom1: itterations, custom2: maxspeed (0 = nolimit) */
 bNodeType cmp_node_vecblur= {
+       /* next, prev  */       NULL, NULL,
        /* type code   */       CMP_NODE_VECBLUR,
        /* name        */       "Vector Blur",
        /* width+range */       120, 80, 200,
index 1a01bb3a6a78c7e4401050eafc3d348d738aacdc..aee1663d4e349ac94ab492dc239288873438cf2a 100644 (file)
@@ -125,6 +125,7 @@ static void node_composit_init_viewer(bNode* node)
 }
 
 bNodeType cmp_node_viewer= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_VIEWER,
        /* name        */       "Viewer",
        /* width+range */       80, 60, 200,
index 716f447f3df9d30ada53d19660647cad87120ae6..bff839cad659617dfe9ebeb57f74976be72376a1 100644 (file)
@@ -137,6 +137,7 @@ static void node_composit_exec_zcombine(void *data, bNode *node, bNodeStack **in
 }
 
 bNodeType cmp_node_zcombine= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       CMP_NODE_ZCOMBINE,
        /* name        */       "Z Combine",
        /* width+range */       80, 40, 120,
index 5134f720b9eeaf855caa4515e68cca8603eb58d2..af4ba788f6b0fcfa37c9ef9f0a2c9c6edfe0f1a0 100644 (file)
@@ -50,6 +50,7 @@ static void node_shader_exec_camera(void *data, bNode *node, bNodeStack **in, bN
        }
 
 bNodeType sh_node_camera= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_CAMERA,
        /* name        */       "Camera Data",
        /* width+range */       95, 95, 120,
index 39787486004957bd80fa89391c7d5fd82700da60..ec2af7910015b81aa873d97db39beaee9fed3c1b 100644 (file)
@@ -57,6 +57,7 @@ static void node_shader_init_curve_vec(bNode* node)
 }
 
 bNodeType sh_node_curve_vec= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_CURVE_VEC,
        /* name        */       "Vector Curves",
        /* width+range */       200, 140, 320,
@@ -97,6 +98,7 @@ static void node_shader_init_curve_rgb(bNode *node)
 }
 
 bNodeType sh_node_curve_rgb= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_CURVE_RGB,
        /* name        */       "RGB Curves",
        /* width+range */       200, 140, 320,
index 2be1f0ddfe82b7a048687a9083035649baa324ba..584ceb0dbbd7b97cecbdf4cad92f9b682c9e6e60 100644 (file)
@@ -115,6 +115,7 @@ static void node_shader_init_geometry(bNode *node)
 
 /* node type definition */
 bNodeType sh_node_geom= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_GEOMETRY,
        /* name        */       "Geometry",
        /* width+range */       120, 80, 160,
index 3a6e89cc0a1471114f63443f38f4c8920d23f06a..a22159dcf16ce8548562191886a6c0025978cfa5 100644 (file)
@@ -70,6 +70,7 @@ static void node_shader_init_mapping(bNode *node)
 }
 
 bNodeType sh_node_mapping= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_MAPPING,
        /* name        */       "Mapping",
        /* width+range */       240, 160, 320,
index 1d87d294dbe20465e658cce09755a0b038563502..fdb6c71ba85b9ba89191bee75fac6f2844d796a0 100644 (file)
@@ -136,6 +136,7 @@ static void node_shader_init_material(bNode* node)
 
 
 bNodeType sh_node_material= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_MATERIAL,
        /* name        */       "Material",
        /* width+range */       120, 80, 240,
index 3a08c3b117cc04a4e187308138d956b293bb287e..bd2fdb457c04096e3eeedec5b8e734dc3fb1617c 100644 (file)
@@ -178,7 +178,8 @@ bNodeStack **out)
        } 
 }
 
-bNodeType sh_node_math= { 
+bNodeType sh_node_math= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */ SH_NODE_MATH, 
        /* name        */ "Math", 
        /* width+range */ 120, 110, 160, 
index 555a8d27ab9613f308ee4d58e57dae250f485305..fb0bf91a50860b3c62680ad1bec5d21f858fc09d 100644 (file)
@@ -61,6 +61,7 @@ static void node_shader_exec_mix_rgb(void *data, bNode *node, bNodeStack **in, b
 }
 
 bNodeType sh_node_mix_rgb= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_MIX_RGB,
        /* name        */       "Mix",
        /* width+range */       100, 60, 150,
index 4433e62cb25dff96a641011cd7fcb66c1affd6ee..ac9d17075438dfba2a82c14693402ce6a113cace 100644 (file)
@@ -58,6 +58,7 @@ static void node_shader_exec_normal(void *data, bNode *node, bNodeStack **in, bN
 }
 
 bNodeType sh_node_normal= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_NORMAL,
        /* name        */       "Normal",
        /* width+range */       100, 60, 200,
index c53d662fac72991898fb4ba2acfeefb3057c9cce..4ed507f4774a13c35ab5fbe3cda97374b9604f81 100644 (file)
@@ -63,6 +63,7 @@ static void node_shader_exec_output(void *data, bNode *node, bNodeStack **in, bN
 }
 
 bNodeType sh_node_output= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_OUTPUT,
        /* name        */       "Output",
        /* width+range */       80, 60, 200,
index 21b6f4640c279e246ec04751e75240bf10af3631..d1c874c151b76df1dad069ccd8936db8191b0e3a 100644 (file)
@@ -43,6 +43,7 @@ static void node_shader_exec_rgb(void *data, bNode *node, bNodeStack **in, bNode
 }
 
 bNodeType sh_node_rgb= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_RGB,
        /* name        */       "RGB",
        /* width+range */       100, 60, 140,
index fa9cf3a3de06149b6cdbd43e3b05cdaf41ee25b5..f0031113b94aa55a0e37079145b48f312d06f71c 100644 (file)
@@ -55,6 +55,7 @@ bNodeStack **out)
 }
 
 bNodeType sh_node_squeeze= { 
+       /* *next,*prev */       NULL, NULL,
        /* type code   */ SH_NODE_SQUEEZE, 
        /* name        */ "Squeeze Value", 
        /* width+range */ 120, 110, 160, 
index 3da2b5cae717f12ed9e174ac01ddcd51dc8afb08..8ba66d56b3c4eff0b1579a1761dff96f3319d226 100644 (file)
@@ -111,6 +111,7 @@ static void node_shader_exec_texture(void *data, bNode *node, bNodeStack **in, b
 }
 
 bNodeType sh_node_texture= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_TEXTURE,
        /* name        */       "Texture",
        /* width+range */       120, 80, 240,
index 223f8fc4af89da4a58f64b86e9c8437897e8a9ef..90e8cb28face9d9ef856a09439f5c9d7eb34f39b 100644 (file)
@@ -60,6 +60,7 @@ static void node_shader_init_valtorgb(bNode *node)
 }
 
 bNodeType sh_node_valtorgb= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_VALTORGB,
        /* name        */       "ColorRamp",
        /* width+range */       240, 200, 300,
@@ -93,6 +94,7 @@ static void node_shader_exec_rgbtobw(void *data, bNode *node, bNodeStack **in, b
 }
 
 bNodeType sh_node_rgbtobw= {
+       /* *next,*prev */       NULL, NULL,
    /* type code   */   SH_NODE_RGBTOBW,
    /* name        */   "RGB to BW",
    /* width+range */   80, 40, 120,
index aeeda4734b53d3f17ff16dfe45e7330f3b94553f..9d6f6a3447383b60d7f21727d7da802327e7b0d0 100644 (file)
@@ -45,6 +45,7 @@ static void node_shader_exec_value(void *data, bNode *node, bNodeStack **in, bNo
 
 
 bNodeType sh_node_value= {
+       /* *next,*prev */       NULL, NULL,
        /* type code   */       SH_NODE_VALUE,
        /* name        */       "Value",
        /* width+range */       80, 50, 120,
index 1d1f36b9fa5c10de6208653606d4c64b1a625fa6..17b692fd616c14c884d8269ff2b9d6b027c1a61a 100644 (file)
@@ -100,6 +100,7 @@ static void node_shader_exec_vect_math(void *data, bNode *node, bNodeStack **in,
 }
 
 bNodeType sh_node_vect_math= { 
+       /* *next,*prev */       NULL, NULL,
        /* type code   */ SH_NODE_VECT_MATH, 
        /* name        */ "Vector Math", 
        /* width+range */ 80, 75, 140, 
index 7978640039fa8be296ef242387200b6b2379ce6f..7faa4ecc76f80086faa504895b001cf2c632e2ec 100644 (file)
@@ -1621,19 +1621,19 @@ static void node_composit_set_butfunc(bNodeType *ntype)
 
 void init_node_butfuncs(void)
 {
-       bNodeType **typedefs;
+       bNodeType *ntype;
        
        /* shader nodes */
-       typedefs= node_all_shaders;             /* BKE_node.h */
-       while( *typedefs) {
-               node_shader_set_butfunc(*typedefs);
-               typedefs++;
+       ntype= node_all_shaders.first;
+       while(ntype) {
+               node_shader_set_butfunc(ntype);
+               ntype= ntype->next;
        }
        /* composit nodes */
-       typedefs= node_all_composit;            /* BKE_node.h */
-       while( *typedefs) {
-               node_composit_set_butfunc(*typedefs);
-               typedefs++;
+       ntype= node_all_composit.first;
+       while(ntype) {
+               node_composit_set_butfunc(ntype);
+               ntype= ntype->next;
        }
 }
 
index 2697cb0c39b2740379ace5981e73548e629528d1..b9f02cc7bd01c76ff62294730d1b0e6cc33cd4f7 100644 (file)
@@ -247,9 +247,12 @@ static void node_make_addmenu(SpaceNode *snode, int nodeclass, uiBlock *block)
                                                tot++;
                        }
                        else {
-                               for(typedefs= ntree->alltypes; *typedefs; typedefs++)
-                                       if( (*typedefs)->nclass == nodeclass )
+                               bNodeType *type = ntree->alltypes.first;
+                               while(type) {
+                                       if(type->nclass == nodeclass)
                                                tot++;
+                                       type= type->next;
+                               }
                        }
                }       
                
@@ -270,10 +273,12 @@ static void node_make_addmenu(SpaceNode *snode, int nodeclass, uiBlock *block)
                        }
                }
                else {
-                       for(a=0, typedefs= ntree->alltypes; *typedefs; typedefs++) {
-                               if( (*typedefs)->nclass == nodeclass ) {
-                                       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, (*typedefs)->name, 0, 
-                                               yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, (*typedefs)->type, "");
+                       bNodeType *type;
+                       for(a=0, type= ntree->alltypes.first; type; type=type->next) {
+                               if( type->nclass == nodeclass ) {
+                                       printf("node %s\n", type->name);
+                                       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, type->name, 0, 
+                                               yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, type->type, "");
                                        a++;
                                }
                        }
index a200e8d44ebbfd5d085a54ba16419f5bc212b0ec..3143b9652aafcd0da0716d40c9a100c773ea9fbc 100644 (file)
@@ -1576,7 +1576,6 @@ static TBitem *node_add_sublevel(ListBase *storage, bNodeTree *ntree, int nodecl
 {
        static TBitem _addmenu[]= { {   0, " ",         0, NULL}, {  -1, "",                    0, NULL}};
        Link *link;
-       bNodeType **typedefs;
        TBitem *addmenu;
        int tot= 0, a;
        
@@ -1588,9 +1587,13 @@ static TBitem *node_add_sublevel(ListBase *storage, bNodeTree *ntree, int nodecl
                                        tot++;
                }
                else {
-                       for(typedefs= ntree->alltypes; *typedefs; typedefs++)
-                               if( (*typedefs)->nclass == nodeclass )
+                       bNodeType *ntype = ntree->alltypes.first;
+                       while(ntype) {
+                               if(ntype->nclass == nodeclass) {
                                        tot++;
+                               }
+                               ntype= ntype->next;
+                       }
                }
        }       
        if(tot==0) {
@@ -1612,15 +1615,16 @@ static TBitem *node_add_sublevel(ListBase *storage, bNodeTree *ntree, int nodecl
                }
        }
        else {
-               for(a=0, typedefs= ntree->alltypes; *typedefs; typedefs++) {
-                       if( (*typedefs)->nclass == nodeclass ) {
-                               addmenu[a].name= (*typedefs)->name;
-                               addmenu[a].retval= (*typedefs)->type;
+               bNodeType *ntype= ntree->alltypes.first;
+               for(a=0; ntype; ntype= ntype->next) {
+                       if( ntype->nclass == nodeclass ) {
+                               addmenu[a].name= ntype->name;
+                               addmenu[a].retval= ntype->type;
                                a++;
                        }
                }
        }
-
+       
        addmenu[a].icon= -1;    /* end signal */
        addmenu[a].name= "";
        addmenu[a].retval= a;
index b81cba7d1d0339eadcbf8351a70c3de3075c522b..d8106b8d3d67645642c10b4125b04c4777b2cfc0 100644 (file)
@@ -79,6 +79,7 @@
 #include "BKE_global.h"
 #include "BKE_main.h"
 #include "BKE_mball.h"
+#include "BKE_node.h"
 #include "BKE_packedFile.h"
 #include "BKE_utildefines.h"
 
@@ -967,7 +968,9 @@ void exit_usiblender(void)
        
        BLI_freelistN(&U.themes);
        BIF_preview_free_dbase();
-               
+       
+       free_nodesystem();
+       
        if(totblock!=0) {
                printf("Error Totblock: %d\n",totblock);
                MEM_printmemlist();
@@ -986,6 +989,6 @@ void exit_usiblender(void)
 
 
        SYS_DeleteSystem(SYS_GetSystem());
-
+       
        exit(G.afbreek==1);
 }
index abcd23fbb5cc9290f32a028920ecaf04ee49338c..4a9a7a002b04707d161e35293ee1400add6f17f9 100644 (file)
@@ -57,6 +57,7 @@
 #include "BKE_material.h"
 #include "BKE_packedFile.h"
 #include "BKE_scene.h"
+#include "BKE_node.h"
 
 #include "BIF_gl.h"
 #include "BIF_graphics.h"
@@ -313,6 +314,8 @@ int main(int argc, char **argv)
                 */
        pluginapi_force_ref();
        
+       init_nodesystem();
+       
        initglobals();  /* blender.c */
 
        syshandle = SYS_GetSystem();