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 616bca0..3da04b2 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 84e88ee..4ec678e 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 27765b2..63ead41 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 b35c2cb..8335538 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 9c4a342..b443a39 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 0ef0f09..16ed447 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 460f2b6..7c081ec 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 b659ad0..0a833e5 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 6080d97..e1eb442 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 44dd6f8..3c2054e 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 fe0491a..3177152 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 a7b81d4..7f0310d 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 2c705ac..454f423 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 d476ac2..1af5b94 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 b4902fe..bb79a4c 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 760d110..a873948 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 408420a..7f578c5 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 119f754..f44b890 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 fc4b0b1..d4258bd 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 79d1190..d4e6b06 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 b9ae376..29845d8 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 0a69f2e..d909e47 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 172df38..4c7b440 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 427aa01..97faa94 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 d8bb1ce..7515dff 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 662b839..6a0cd63 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 bf103f3..d1b3aa5 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 0bec7e2..94b6772 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 f2766d9..1c690ef 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 a3576a0..c09fe56 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 99f5eb4..244a5d0 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 b3cf20f..50eedca 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 7a323b5..50643cd 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 108042a..342a8e4 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 48a42d1..ec171b6 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 ecc3fb9..79619da 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 3e6142a..572ed53 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 551da1e..eec7ea3 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 2ea91b6..56d5c11 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 d30bf42..d35c347 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 578a07c..8681fce 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 ebaf4d7..81dcc08 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 1a01bb3..aee1663 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 716f447..bff839c 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 5134f72..af4ba78 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 3978748..ec2af79 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 2be1f0d..584ceb0 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 3a6e89c..a22159d 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 1d87d29..fdb6c71 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 3a08c3b..bd2fdb4 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 555a8d2..fb0bf91 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 4433e62..ac9d170 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 c53d662..4ed507f 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 21b6f46..d1c874c 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 fa9cf3a..f003111 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 3da2b5c..8ba66d5 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 223f8fc..90e8cb2 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 aeeda47..9d6f6a3 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 1d1f36b..17b692f 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 7978640..7faa4ec 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 2697cb0..b9f02cc 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 a200e8d..3143b96 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 b81cba7..d8106b8 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 abcd23f..4a9a7a0 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();