use NULL rather then 0 for pointer assignments & comparison, modifier, imbuf & editors.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 5 Mar 2011 10:29:10 +0000 (10:29 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 5 Mar 2011 10:29:10 +0000 (10:29 +0000)
70 files changed:
source/blender/avi/intern/avi.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/view2d.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_lattice.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/physics/particle_object.c
source/blender/editors/render/render_preview.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_buttons/buttons_ops.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_outliner/outliner.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/imbuf/intern/filetype.c
source/blender/imbuf/intern/scaling.c
source/blender/imbuf/intern/targa.c
source/blender/imbuf/intern/thumbs.c
source/blender/makesdna/intern/dna_genfile.c
source/blender/modifiers/intern/MOD_armature.c
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_bevel.c
source/blender/modifiers/intern/MOD_boolean.c
source/blender/modifiers/intern/MOD_cast.c
source/blender/modifiers/intern/MOD_cloth.c
source/blender/modifiers/intern/MOD_collision.c
source/blender/modifiers/intern/MOD_curve.c
source/blender/modifiers/intern/MOD_decimate.c
source/blender/modifiers/intern/MOD_displace.c
source/blender/modifiers/intern/MOD_edgesplit.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_fluidsim.c
source/blender/modifiers/intern/MOD_hook.c
source/blender/modifiers/intern/MOD_lattice.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/modifiers/intern/MOD_meshdeform.c
source/blender/modifiers/intern/MOD_mirror.c
source/blender/modifiers/intern/MOD_multires.c
source/blender/modifiers/intern/MOD_none.c
source/blender/modifiers/intern/MOD_particleinstance.c
source/blender/modifiers/intern/MOD_particlesystem.c
source/blender/modifiers/intern/MOD_screw.c
source/blender/modifiers/intern/MOD_shrinkwrap.c
source/blender/modifiers/intern/MOD_simpledeform.c
source/blender/modifiers/intern/MOD_smoke.c
source/blender/modifiers/intern/MOD_smooth.c
source/blender/modifiers/intern/MOD_softbody.c
source/blender/modifiers/intern/MOD_subsurf.c
source/blender/modifiers/intern/MOD_surface.c
source/blender/modifiers/intern/MOD_uvproject.c
source/blender/modifiers/intern/MOD_wave.c
source/blender/nodes/intern/TEX_nodes/TEX_output.c

index f1adbf3c95875ce84a2c7d61da7bdeca389e3c23..ce414cd15fe054c4710a8d383b2db24048921bda 100644 (file)
@@ -216,7 +216,7 @@ int AVI_is_avi (char *name) {
 
 int AVI_is_avi (const char *name) {
        int temp, fcca, j;
-       AviMovie movie= {0};
+       AviMovie movie= {NULL};
        AviMainHeader header;
        AviBitmapInfoHeader bheader;
        int movie_tracks = 0;
index 5590c43bd449099cc85f85f5a422ee9ab2de911e..930999f05ffa3d6137538459925f9e7575814f3e 100644 (file)
@@ -1039,7 +1039,7 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
                }
                if(y1 < 0) { /* XXX butregion NULL check?, there is one above */
                        int newy1;
-                       UI_view2d_to_region_no_clip(&butregion->v2d, 0, but->y2 + ofsy, 0, &newy1);
+                       UI_view2d_to_region_no_clip(&butregion->v2d, 0, but->y2 + ofsy, NULL, &newy1);
                        newy1 += butregion->winrct.ymin;
 
                        y2= y2-y1 + newy1;
index dd60f0bbd722f0bc1eff6a14b1f59dc68f27ae32..3737cb7e38062264c60a7f8764717bef6e1560f2 100644 (file)
@@ -383,12 +383,12 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
 
                if(id->lib) {
                        if(id->flag & LIB_INDIRECT) {
-                               but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_INDIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, 0, 0, 0, 0, 0,
+                               but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_INDIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
                                        "Indirect library datablock, cannot change.");
                                uiButSetFlag(but, UI_BUT_DISABLED);
                        }
                        else {
-                               but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, 0, 0, 0, 0, 0,
+                               but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
                                        "Direct linked library datablock, click to make local.");
                                if(!id_make_local(id, 1 /* test */) || (idfrom && idfrom->lib))
                                        uiButSetFlag(but, UI_BUT_DISABLED);
@@ -403,9 +403,9 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
                        sprintf(str, "%d", id->us);
 
                        if(id->us<10)
-                               but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X,UI_UNIT_Y, 0, 0, 0, 0, 0, "Displays number of users of this data. Click to make a single-user copy.");
+                               but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Displays number of users of this data. Click to make a single-user copy.");
                        else
-                               but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X+10,UI_UNIT_Y, 0, 0, 0, 0, 0, "Displays number of users of this data. Click to make a single-user copy.");
+                               but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X+10,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Displays number of users of this data. Click to make a single-user copy.");
 
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ALONE));
                        if(!id_copy(id, NULL, 1 /* test only */) || (idfrom && idfrom->lib))
@@ -456,7 +456,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
                if(unlinkop) {
                        but= uiDefIconButO(block, BUT, unlinkop, WM_OP_INVOKE_REGION_WIN, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL);
                        /* so we can access the template from operators, font unlinking needs this */
-                       uiButSetNFunc(but, NULL, MEM_dupallocN(template), 0);
+                       uiButSetNFunc(but, NULL, MEM_dupallocN(template), NULL);
                }
                else {
                        but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Unlink datablock. Shift + Click to set users to zero, data gets not saved");
@@ -1265,15 +1265,15 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand
 
        if(coba==NULL) return;
 
-       bt= uiDefBut(block, BUT, 0,     "Add",                  0+xoffs,100+yoffs,40,20, 0, 0, 0, 0, 0, "Add a new color stop to the colorband");
+       bt= uiDefBut(block, BUT, 0,     "Add",                  0+xoffs,100+yoffs,40,20, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband");
        uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba);
 
-       bt= uiDefBut(block, BUT, 0,     "Delete",               45+xoffs,100+yoffs,45,20, 0, 0, 0, 0, 0, "Delete the active position");
+       bt= uiDefBut(block, BUT, 0,     "Delete",               45+xoffs,100+yoffs,45,20, NULL, 0, 0, 0, 0, "Delete the active position");
        uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba);
 
 
        /* XXX, todo for later - convert to operator - campbell */
-       bt= uiDefBut(block, BUT, 0,     "F",            95+xoffs,100+yoffs,20,20, 0, 0, 0, 0, 0, "Flip colorband");
+       bt= uiDefBut(block, BUT, 0,     "F",            95+xoffs,100+yoffs,20,20, NULL, 0, 0, 0, 0, "Flip colorband");
        uiButSetNFunc(bt, colorband_flip_cb, MEM_dupallocN(cb), coba);
 
        uiDefButS(block, NUM, 0,                "",                             120+xoffs,100+yoffs,80, 20, &coba->cur, 0.0, (float)(MAX2(0, coba->tot-1)), 0, 0, "Choose active color stop");
index 5ddbac8959643853d8f7fbdb96feb6b86dffff4b..8c397d9c14f4f2ec23ed19014a1158bb28806830 100644 (file)
@@ -1006,7 +1006,7 @@ void UI_view2d_view_ortho(View2D *v2d)
        
        /* set matrix on all appropriate axes */
        wmOrtho2(curmasked.xmin-xofs, curmasked.xmax-xofs, curmasked.ymin-yofs, curmasked.ymax-yofs);
-       
+
        /* XXX is this necessary? */
        glLoadIdentity();
 }
index d1488e3d0f086490cff559632d362972dd8ee6af..c3fb3ca5ddd65f6017533a79b3734b1e9129fac8 100644 (file)
@@ -1047,7 +1047,7 @@ static EnumPropertyItem convert_target_items[]= {
 
 static void curvetomesh(Scene *scene, Object *ob) 
 {
-       if(ob->disp.first==0)
+       if(ob->disp.first == NULL)
                makeDispListCurveTypes(scene, ob, 0); /* force creation */
 
        nurbs_to_mesh(ob); /* also does users */
@@ -1213,19 +1213,19 @@ static int convert_exec(bContext *C, wmOperator *op)
 
                        if(cu->vfont) {
                                cu->vfont->id.us--;
-                               cu->vfont= 0;
+                               cu->vfont= NULL;
                        }
                        if(cu->vfontb) {
                                cu->vfontb->id.us--;
-                               cu->vfontb= 0;
+                               cu->vfontb= NULL;
                        }
                        if(cu->vfonti) {
                                cu->vfonti->id.us--;
-                               cu->vfonti= 0;
+                               cu->vfonti= NULL;
                        }
                        if(cu->vfontbi) {
                                cu->vfontbi->id.us--;
-                               cu->vfontbi= 0;
+                               cu->vfontbi= NULL;
                        }
 
                        if (!keep_original) {
index 31ef6f55fddad3b6af4a5ac301811617cdc00619..b4a358150e820a55362b587612813f929689077a 100644 (file)
@@ -315,7 +315,7 @@ static int bake_image_exec(bContext *C, wmOperator *op)
        }
        else {
                ListBase threads;
-               BakeRender bkr= {0};
+               BakeRender bkr= {NULL};
 
                init_bake_internal(&bkr, C);
                bkr.reports= op->reports;
index 31bcfb10ee6db014d301c23b56408c341ac29e66..a8d0b93fa6082882b8179f43bee76d07284d1eff 100644 (file)
@@ -1797,7 +1797,7 @@ static void auto_timeoffs(Scene *scene, View3D *v3d)
        int tot=0, a;
        short offset=25;
 
-       if(BASACT==0 || v3d==NULL) return;
+       if(BASACT==NULL || v3d==NULL) return;
 // XXX if(button(&offset, 0, 1000,"Total time")==0) return;
 
        /* make array of all bases, xco yco (screen) */
@@ -1835,7 +1835,7 @@ static void ofs_timeoffs(Scene *scene, View3D *v3d)
 {
        float offset=0.0f;
 
-       if(BASACT==0 || v3d==NULL) return;
+       if(BASACT==NULL || v3d==NULL) return;
        
 // XXX if(fbutton(&offset, -10000.0f, 10000.0f, 10, 10, "Offset")==0) return;
 
@@ -1855,7 +1855,7 @@ static void rand_timeoffs(Scene *scene, View3D *v3d)
        Base *base;
        float rand_ofs=0.0f;
 
-       if(BASACT==0 || v3d==NULL) return;
+       if(BASACT==NULL || v3d==NULL) return;
        
 // XXX if(fbutton(&rand_ofs, 0.0f, 10000.0f, 10, 10, "Randomize")==0) return;
        
index cea8512af242c876bd206dabd3e855d98084b80e..72bf3b52b742e29c490ff49f9a99c587d142cc05 100644 (file)
@@ -323,7 +323,7 @@ static BPoint *findnearestLattvert(ViewContext *vc, short mval[2], int sel)
                /* sel==1: selected gets a disadvantage */
                /* in nurb and bezt or bp the nearest is written */
                /* return 0 1 2: handlepunt */
-       struct { BPoint *bp; short dist, select, mval[2]; } data = {0};
+       struct { BPoint *bp; short dist, select, mval[2]; } data = {NULL};
 
        data.dist = 100;
        data.select = sel;
index 1267697b139ed4023d6c6909c900fcc237559792..b57935bc3928957ebc49d45618f34b7427f5eb97 100644 (file)
@@ -296,7 +296,7 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene *
        psys=((ParticleSystemModifierData *)md)->psys;
        part= psys->part;
 
-       if(part->ren_as != PART_DRAW_PATH || psys->pathcache == 0)
+       if(part->ren_as != PART_DRAW_PATH || psys->pathcache == NULL)
                return 0;
 
        totpart= psys->totcached;
index d3baea4c18094a0214c4e1fd34c9dfd6fc4b9717..baf88ba1d9aa92f0fdd4a76b4875f2905b24eaac 100644 (file)
@@ -1427,7 +1427,7 @@ static void new_id_matar(Material **matar, int totcol)
        
        for(a=0; a<totcol; a++) {
                id= (ID *)matar[a];
-               if(id && id->lib==0) {
+               if(id && id->lib == NULL) {
                        if(id->newid) {
                                matar[a]= (Material *)id->newid;
                                id_us_plus(id->newid);
@@ -1581,7 +1581,7 @@ static void do_single_tex_user(Tex **from)
        Tex *tex, *texn;
        
        tex= *from;
-       if(tex==0) return;
+       if(tex==NULL) return;
        
        if(tex->id.newid) {
                *from= (Tex *)tex->id.newid;
index 49cb9ac9e6fde4be014a36e53b85a1aced18b32b..52486677e87b85f949a4fe60bfadaa1ccaeb5b77 100644 (file)
@@ -187,7 +187,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
        Object *ob;
        void *obdata = NULL;
        Material *mat = NULL, *mat1;
-       Tex *tex=0;
+       Tex *tex= NULL;
        int a, b;
        int nr = RNA_enum_get(op->ptr, "type");
        short changed = 0, extend;
@@ -222,15 +222,15 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
        else if(nr==2) {
-               if(ob->data==0) return OPERATOR_CANCELLED;
+               if(ob->data==NULL) return OPERATOR_CANCELLED;
                obdata= ob->data;
        }
        else if(nr==3 || nr==4) {
                mat= give_current_material(ob, ob->actcol);
-               if(mat==0) return OPERATOR_CANCELLED;
+               if(mat==NULL) return OPERATOR_CANCELLED;
                if(nr==4) {
                        if(mat->mtex[ (int)mat->texact ]) tex= mat->mtex[ (int)mat->texact ]->tex;
-                       if(tex==0) return OPERATOR_CANCELLED;
+                       if(tex==NULL) return OPERATOR_CANCELLED;
                }
        }
        else if(nr==5) {
@@ -592,7 +592,7 @@ static int object_select_grouped_exec(bContext *C, wmOperator *op)
        }
        
        ob= OBACT;
-       if(ob==0)
+       if(ob==NULL) 
                BKE_report(op->reports, RPT_ERROR, "No Active Object");
                return OPERATOR_CANCELLED;
        }
index c8e733994077ea4dbec053319bd401a57392ab24..8ec95e9b1072994b29cf45ff22bc160cdf9acd8f 100644 (file)
@@ -629,7 +629,7 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
        PTCacheEditPoint *point;
        PTCacheEditKey *ekey = NULL;
        HairKey *key;
-       BVHTreeFromMesh bvhtree= {0};
+       BVHTreeFromMesh bvhtree= {NULL};
        BVHTreeNearest nearest;
        MFace *mface;
        DerivedMesh *dm = NULL;
index 33f81bb7d16701da076a757c553d251ef18e391f..a1ef042f8e408510bdde5dd69d67d93fb93b4322 100644 (file)
@@ -177,7 +177,7 @@ void draw_tex_crop(Tex *tex)
        rcti rct;
        int ret= 0;
        
-       if(tex==0) return;
+       if(tex==NULL) return;
        
        if(tex->type==TEX_IMAGE) {
                if(tex->cropxmin==0.0f) ret++;
@@ -1219,7 +1219,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat
        if(idtype == ID_IM) {
                Image *ima= (Image*)id;
                ImBuf *ibuf= NULL;
-               ImageUser iuser= {0};
+               ImageUser iuser= {NULL};
 
                /* ima->ok is zero when Image cannot load */
                if(ima==NULL || ima->ok==0)
index b9c79547c77b9254349a5f1a042aa8982385eec4..883f2ee7128c49a46de10247673a1787e526b774 100644 (file)
@@ -1423,7 +1423,7 @@ void ED_region_header(const bContext *C, ARegion *ar)
        uiBlock *block;
        uiLayout *layout;
        HeaderType *ht;
-       Header header = {0};
+       Header header = {NULL};
        int maxco, xco, yco;
 
        /* clear */     
index b298c3066998c3835a05f33cb0e59644965a6f2a..44a7a7c48b3262c7373caa5a3f23e95a79530604 100644 (file)
@@ -227,16 +227,16 @@ void removenotused_scredges(bScreen *sc)
        sa= sc->areabase.first;
        while(sa) {
                se= screen_findedge(sc, sa->v1, sa->v2);
-               if(se==0) printf("error: area %d edge 1 doesn't exist\n", a);
+               if(se==NULL) printf("error: area %d edge 1 doesn't exist\n", a);
                else se->flag= 1;
                se= screen_findedge(sc, sa->v2, sa->v3);
-               if(se==0) printf("error: area %d edge 2 doesn't exist\n", a);
+               if(se==NULL) printf("error: area %d edge 2 doesn't exist\n", a);
                else se->flag= 1;
                se= screen_findedge(sc, sa->v3, sa->v4);
-               if(se==0) printf("error: area %d edge 3 doesn't exist\n", a);
+               if(se==NULL) printf("error: area %d edge 3 doesn't exist\n", a);
                else se->flag= 1;
                se= screen_findedge(sc, sa->v4, sa->v1);
-               if(se==0) printf("error: area %d edge 4 doesn't exist\n", a);
+               if(se==NULL) printf("error: area %d edge 4 doesn't exist\n", a);
                else se->flag= 1;
                sa= sa->next;
                a++;
@@ -1495,7 +1495,7 @@ int ED_screen_full_newspace(bContext *C, ScrArea *sa, int type)
        bScreen *screen= CTX_wm_screen(C);
        ScrArea *newsa= NULL;
 
-       if(!sa || sa->full==0) {
+       if(!sa || sa->full==NULL) {
                newsa= ED_screen_full_toggle(C, win, sa);
        }
        
index e7368e075f93cc18194bf6ff70242c6640bc358a..70bb4d482964b2e01102d6cd206c19ea5ee89604 100644 (file)
@@ -1761,7 +1761,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
 {
        Scene *scene= CTX_data_scene(C);
        Object *ob= CTX_data_active_object(C);
-       bDopeSheet ads= {0};
+       bDopeSheet ads= {NULL};
        DLRBT_Tree keys;
        ActKeyColumn *ak;
        float cfra= (scene)? (float)(CFRA) : 0.0f;
index afa2e07f37d7e9915af87120cac82f613b57290c..6c696ac357bc6b424622f0d65262a97c412f4f62 100644 (file)
@@ -5334,7 +5334,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
 {
        Scene *scene= CTX_data_scene(C);
        Object *ob= CTX_data_active_object(C);
-       Mesh *me= 0;
+       Mesh *me= NULL;
        
        if(ob==NULL)
                return OPERATOR_CANCELLED;
@@ -5459,7 +5459,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
 {
        Image *image= BLI_findlink(&CTX_data_main(C)->image, RNA_enum_get(op->ptr, "image"));
        Scene *scene= CTX_data_scene(C);
-       ProjPaintState ps= {0};
+       ProjPaintState ps= {NULL};
        int orig_brush_size;
        IDProperty *idgroup;
        IDProperty *view_data= NULL;
index d7fdf42fa62bdfd488e2786f32f622bf579f84f5..3f37238c40f0b58521bd878c4cd5232490750275 100644 (file)
@@ -167,7 +167,7 @@ static int load_tex(Sculpt *sd, Brush* br, ViewContext* vc)
        static Snapshot snap;
        static int old_size = -1;
 
-       GLubyte* buffer = 0;
+       GLubyte* buffer = NULL;
 
        int size;
        int j;
index c3522d0b5967d11c2c4d61daf7b5d099dfd8419c..b0979817c886199979d8145c6510ffa9425b8219 100644 (file)
@@ -203,7 +203,7 @@ static void do_shared_vertexcol(Mesh *me)
        short *scolmain, *scol;
        char *mcol;
        
-       if(me->mcol==0 || me->totvert==0 || me->totface==0) return;
+       if(me->mcol==NULL || me->totvert==0 || me->totface==0) return;
        
        scolmain= MEM_callocN(4*sizeof(short)*me->totvert, "colmain");
        
@@ -264,7 +264,7 @@ static void make_vertexcol(Object *ob)      /* single ob */
        Mesh *me;
        if(!ob || ob->id.lib) return;
        me= get_mesh(ob);
-       if(me==0) return;
+       if(me==NULL) return;
        if(me->edit_mesh) return;
 
        /* copies from shadedisplist to mcol */
@@ -322,7 +322,7 @@ void vpaint_fill(Object *ob, unsigned int paintcol)
        int i, selected;
 
        me= get_mesh(ob);
-       if(me==0 || me->totface==0) return;
+       if(me==NULL || me->totface==0) return;
 
        if(!me->mcol)
                make_vertexcol(ob);
@@ -358,7 +358,7 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
        int selected;
        
        me= ob->data;
-       if(me==0 || me->totface==0 || me->dvert==0 || !me->mface) return;
+       if(me==NULL || me->totface==0 || me->dvert==NULL || !me->mface) return;
        
        selected= (me->editflag & ME_EDIT_PAINT_MASK);
 
index 473e2ac3b9603900f985f52059c09880fb2a2877..bb1aa1b6444d06501f8e66eea8363978fe065b15 100644 (file)
@@ -1220,7 +1220,7 @@ static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
        ListBase anim_data= {NULL, NULL};
        bAnimListElem *ale;
        int filter;
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        
        /* get editor data */
        if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -1290,7 +1290,7 @@ static void snap_action_keys(bAnimContext *ac, short mode)
        bAnimListElem *ale;
        int filter;
        
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        KeyframeEditFunc edit_cb;
        
        /* filter data */
@@ -1389,7 +1389,7 @@ static void mirror_action_keys(bAnimContext *ac, short mode)
        bAnimListElem *ale;
        int filter;
        
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        KeyframeEditFunc edit_cb;
        
        /* get beztriple editing callbacks */
index 7f5abbd210fc28c59617c540d0f5381e1c466dbc..f9687e99c874de1ad67708fdea3a006088bf95de 100644 (file)
@@ -90,7 +90,7 @@ static void deselect_action_keys (bAnimContext *ac, short test, short sel)
        bAnimListElem *ale;
        int filter;
        
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        KeyframeEditFunc test_cb, sel_cb;
        
        /* determine type-based settings */
@@ -371,7 +371,7 @@ static void markers_selectkeys_between (bAnimContext *ac)
        int filter;
        
        KeyframeEditFunc ok_cb, select_cb;
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        float min, max;
        
        /* get extreme markers */
@@ -422,7 +422,7 @@ static void columnselect_action_keys (bAnimContext *ac, short mode)
        Scene *scene= ac->scene;
        CfraElem *ce;
        KeyframeEditFunc select_cb, ok_cb;
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        
        /* initialise keyframe editing data */
        
@@ -608,7 +608,7 @@ static void select_moreless_action_keys (bAnimContext *ac, short mode)
        bAnimListElem *ale;
        int filter;
        
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        KeyframeEditFunc build_cb;
        
        
@@ -730,7 +730,7 @@ static void actkeys_select_leftright (bAnimContext *ac, short leftright, short s
        int filter;
        
        KeyframeEditFunc ok_cb, select_cb;
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        Scene *scene= ac->scene;
        
        /* if select mode is replace, deselect all keyframes (and channels) first */
@@ -908,7 +908,7 @@ static void actkeys_mselect_single (bAnimContext *ac, bAnimListElem *ale, short
        bDopeSheet *ads= (ac->datatype == ANIMCONT_DOPESHEET) ? ac->data : NULL;
        int ds_filter = ((ads) ? (ads->filterflag) : (0));
        
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        KeyframeEditFunc select_cb, ok_cb;
        
        /* get functions for selecting keyframes */
@@ -934,7 +934,7 @@ static void actkeys_mselect_column(bAnimContext *ac, short select_mode, float se
        int filter;
        
        KeyframeEditFunc select_cb, ok_cb;
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        
        /* initialise keyframe editing data */
        
index 3224821e744f61e78815ee012566bfee4c6e2299..9190d5aff546710d2155fce0b6b91df9084eb9b7 100644 (file)
@@ -107,7 +107,7 @@ static int file_browse_exec(bContext *C, wmOperator *op)
        if (RNA_property_is_set(op->ptr, "filepath")==0 || fbo==NULL)
                return OPERATOR_CANCELLED;
        
-       str= RNA_string_get_alloc(op->ptr, "filepath", 0, 0);
+       str= RNA_string_get_alloc(op->ptr, "filepath", NULL, 0);
 
        /* add slash for directories, important for some properties */
        if(RNA_property_subtype(fbo->prop) == PROP_DIRPATH) {
@@ -155,7 +155,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event)
        if(!prop)
                return OPERATOR_CANCELLED;
 
-       str= RNA_property_string_get_alloc(&ptr, prop, 0, 0);
+       str= RNA_property_string_get_alloc(&ptr, prop, NULL, 0);
 
        /* useful yet irritating feature, Shift+Click to open the file
         * Alt+Click to browse a folder in the OS's browser */
index 5636c40cef227bafe3d96667bf3733dcd007b459..97c2d9e3eb406e381d11644db75d45bf3230cbf5 100644 (file)
@@ -717,7 +717,7 @@ static int copy_exec(bContext *C, wmOperator *UNUSED(op))
        int sel[2];
        int offset= 0;
 
-       ConsoleLine cl_dummy= {0};
+       ConsoleLine cl_dummy= {NULL};
 
 #if 0
        /* copy whole file */
index 7d9eec891b82e7b490b960adaa14d9254dc1f15f..98bd6c0e70b5e2718c94fbd994cd6ffbef3deda7 100644 (file)
@@ -389,7 +389,7 @@ static void file_draw_preview(uiBlock *block, struct direntry *file, int sx, int
                uiButSetDragImage(but, file->path, get_file_icon(file), imb, scale);
                
                glDisable(GL_BLEND);
-               imb = 0;
+               imb = NULL;
        }
 }
 
index 88287b6a7dab1d6b2c162c4aecc83d8c15fe0676..bd188d07a86dd815019350173b5baa8291c597ac 100644 (file)
@@ -540,20 +540,20 @@ void filelist_free(struct FileList* filelist)
                if (filelist->filelist[i].image) {                      
                        IMB_freeImBuf(filelist->filelist[i].image);
                }
-               filelist->filelist[i].image = 0;
+               filelist->filelist[i].image = NULL;
                if (filelist->filelist[i].relname)
                        MEM_freeN(filelist->filelist[i].relname);
                if (filelist->filelist[i].path)
                        MEM_freeN(filelist->filelist[i].path);
-               filelist->filelist[i].relname = 0;
+               filelist->filelist[i].relname = NULL;
                if (filelist->filelist[i].string)
                        MEM_freeN(filelist->filelist[i].string);
-               filelist->filelist[i].string = 0;
+               filelist->filelist[i].string = NULL;
        }
        
        filelist->numfiles = 0;
        free(filelist->filelist);
-       filelist->filelist = 0; 
+       filelist->filelist = NULL;      
        filelist->filter = 0;
        filelist->filter_glob[0] = '\0';
        filelist->numfiltered =0;
@@ -564,7 +564,7 @@ void filelist_freelib(struct FileList* filelist)
 {
        if(filelist->libfiledata)       
                BLO_blendhandle_close(filelist->libfiledata);
-       filelist->libfiledata= 0;
+       filelist->libfiledata= NULL;
 }
 
 struct BlendHandle *filelist_lib(struct FileList* filelist)
@@ -841,8 +841,8 @@ static void filelist_read_dir(struct FileList* filelist)
        char wdir[FILE_MAX]= "";
        if (!filelist) return;
 
-       filelist->fidx = 0;
-       filelist->filelist = 0;
+       filelist->fidx = NULL;
+       filelist->filelist = NULL;
 
        BLI_getwdN(wdir, sizeof(wdir));  /* backup cwd to restore after */
 
@@ -896,7 +896,7 @@ void filelist_readdir(struct FileList* filelist)
 
 int filelist_empty(struct FileList* filelist)
 {      
-       return filelist->filelist == 0;
+       return filelist->filelist == NULL;
 }
 
 void filelist_parent(struct FileList* filelist)
@@ -977,7 +977,7 @@ void filelist_from_library(struct FileList* filelist)
        if (!ok) {
                /* free */
                if(filelist->libfiledata) BLO_blendhandle_close(filelist->libfiledata);
-               filelist->libfiledata= 0;
+               filelist->libfiledata= NULL;
                return;
        }
        
@@ -985,9 +985,9 @@ void filelist_from_library(struct FileList* filelist)
 
        /* there we go */
        /* for the time being only read filedata when libfiledata==0 */
-       if (filelist->libfiledata==0) {
+       if (filelist->libfiledata == NULL) {
                filelist->libfiledata= BLO_blendhandle_from_file(dir);
-               if(filelist->libfiledata==0) return;
+               if(filelist->libfiledata == NULL) return;
        }
        
        idcode= groupname_to_code(group);
@@ -1116,7 +1116,7 @@ void filelist_from_main(struct FileList *filelist)
                idcode= groupname_to_code(filelist->dir);
                
                lb= which_libbase(G.main, idcode );
-               if(lb==0) return;
+               if(lb == NULL) return;
                
                id= lb->first;
                filelist->numfiles= 0;
index cc741392de22659a598270a71cddd2af7dfe8e8e..87ffc2075c97aa3d7e08dcbb6e94f032d22e44eb 100644 (file)
@@ -405,12 +405,12 @@ static void column_widths(struct FileList* files, struct FileLayout* layout)
 void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
 {
        FileSelectParams *params = ED_fileselect_get_params(sfile);
-       FileLayout *layout=0;
+       FileLayout *layout= NULL;
        View2D *v2d= &ar->v2d;
        int maxlen = 0;
        int numfiles;
        int textheight;
-       if (sfile->layout == 0) {
+       if (sfile->layout == NULL) {
                sfile->layout = MEM_callocN(sizeof(struct FileLayout), "file_layout");
                sfile->layout->dirty = 1;
        } 
index 2cc4bb81bf30351f7fc1b0291ab42136118e7fb8..18f2b4944e7bceaaae35985ea3a87503d11d77ce 100644 (file)
@@ -91,7 +91,7 @@ static void deselect_graph_keys (bAnimContext *ac, short test, short sel)
        int filter;
        
        SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        KeyframeEditFunc test_cb, sel_cb;
        
        /* determine type-based settings */
@@ -729,7 +729,7 @@ static void graphkeys_select_leftright (bAnimContext *ac, short leftright, short
        int filter;
        
        KeyframeEditFunc ok_cb, select_cb;
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        Scene *scene= ac->scene;
        
        /* if select mode is replace, deselect all keyframes (and channels) first */
index 141a62307c0019c9f4c49a2717de001451dbcb3a..8b3ceecc7da8681688ce8bf6d6a717350eb1ff0f 100644 (file)
@@ -929,7 +929,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
                                uiItemR(col, userptr, "frame_duration", 0, str, ICON_NONE);
                                if(ima->anim) {
                                        block= uiLayoutGetBlock(row);
-                                       but= uiDefBut(block, BUT, 0, "Match Movie Length", 0, 0, UI_UNIT_X*2, UI_UNIT_Y, 0, 0, 0, 0, 0, "Set the number of frames to match the movie or sequence.");
+                                       but= uiDefBut(block, BUT, 0, "Match Movie Length", 0, 0, UI_UNIT_X*2, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Set the number of frames to match the movie or sequence.");
                                        uiButSetFunc(but, set_frames_cb, ima, iuser);
                                }
 
index 35a9c97967df7cc34b318f52e12cbf4847d8dc63..300d38732ecb99654aed5002c77188a710b223af 100644 (file)
@@ -1423,7 +1423,7 @@ static int nlaedit_apply_scale_exec (bContext *C, wmOperator *UNUSED(op))
        bAnimListElem *ale;
        int filter;
        
-       KeyframeEditData ked= {{0}};
+       KeyframeEditData ked= {{NULL}};
        
        /* get editor data */
        if (ANIM_animdata_get_context(C, &ac) == 0)
index a1540337ff9b83896385bb4af1d7fdc17f39ec65..ebbb33631a91e6328481525a65806c7caa79a305 100644 (file)
@@ -464,7 +464,7 @@ static void node_draw_mute_line(View2D *v2d, SpaceNode *snode, bNode *node)
 {
        bNodeSocket *valsock= NULL, *colsock= NULL, *vecsock= NULL;
        bNodeSocket *sock;
-       bNodeLink link= {0};
+       bNodeLink link= {NULL};
        int a;
        
        /* connect the first value buffer in with first value out */
index 439f9e6fde7fc0576ec8a809cb55f1135cb4cd55..765cd360f96ec069f9713702c69d4dc47a675f4f 100644 (file)
@@ -3291,7 +3291,7 @@ static void id_local_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *
        if(tselem->id->lib && (tselem->id->flag & LIB_EXTERN)) {
                tselem->id->lib= NULL;
                tselem->id->flag= LIB_LOCAL;
-               new_id(0, tselem->id, 0);
+               new_id(NULL, tselem->id, NULL);
        }
 }
 
@@ -5251,15 +5251,15 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
                                uiBlockSetEmboss(block, UI_EMBOSSN);
 
                                restrict_bool= group_restrict_flag(gr, OB_RESTRICT_VIEW);
-                               bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_VIEW_ON : ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, 17, OL_H-1, 0, 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+                               bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_VIEW_ON : ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, 17, OL_H-1, NULL, 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
                                uiButSetFunc(bt, restrictbutton_gr_restrict_view, scene, gr);
 
                                restrict_bool= group_restrict_flag(gr, OB_RESTRICT_SELECT);
-                               bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_SELECT_ON : ICON_RESTRICT_SELECT_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, 17, OL_H-1, 0, 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
+                               bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_SELECT_ON : ICON_RESTRICT_SELECT_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, 17, OL_H-1, NULL, 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
                                uiButSetFunc(bt, restrictbutton_gr_restrict_select, scene, gr);
 
                                restrict_bool= group_restrict_flag(gr, OB_RESTRICT_RENDER);
-                               bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_RENDER_ON : ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (int)te->ys, 17, OL_H-1, 0, 0, 0, 0, 0, "Restrict/Allow renderability");
+                               bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_RENDER_ON : ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (int)te->ys, 17, OL_H-1, NULL, 0, 0, 0, 0, "Restrict/Allow renderability");
                                uiButSetFunc(bt, restrictbutton_gr_restrict_render, scene, gr);
 
                                uiBlockSetEmboss(block, UI_EMBOSS);
index c9950d6c384fd445387d1ccead5f7c249865da71..78ac17d450d69936e5cf537feaa6cbc898fbb118 100644 (file)
@@ -367,7 +367,7 @@ static GPUTexture *GPU_texture_create_nD(int w, int h, int n, float *fpixels, in
        }
 
        if (tex->target == GL_TEXTURE_1D) {
-               glTexImage1D(tex->target, 0, internalformat, tex->w, 0, format, type, 0);
+               glTexImage1D(tex->target, 0, internalformat, tex->w, 0, format, type, NULL);
 
                if (fpixels) {
                        glTexSubImage1D(tex->target, 0, 0, w, format, type,
@@ -380,7 +380,7 @@ static GPUTexture *GPU_texture_create_nD(int w, int h, int n, float *fpixels, in
        }
        else {
                glTexImage2D(tex->target, 0, internalformat, tex->w, tex->h, 0,
-                       format, type, 0);
+                       format, type, NULL);
 
                if (fpixels) {
                        glTexSubImage2D(tex->target, 0, 0, 0, w, h,
index 7e6005a6c2adeb48a013e8dd596b12762c259976..c51211899528c08ec2924d45b2405d99e0db0549 100644 (file)
@@ -90,7 +90,7 @@ ImFileType IMB_FILE_TYPES[]= {
 #ifdef WITH_QUICKTIME
        {quicktime_init, quicktime_exit, imb_is_a_quicktime, imb_ftype_quicktime, imb_quicktime_decode, NULL, NULL, 0, QUICKTIME},
 #endif 
-       {NULL, NULL, NULL, NULL, NULL, NULL, 0}};
+       {NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0}};
        
 void imb_filetypes_init(void)
 {
index fbea72bfafcdb9198c9551b521ec0ce88b5b1e9b..64a9603610b41f56ce94ad33cdcea0e5b7acd100 100644 (file)
@@ -59,8 +59,8 @@ struct ImBuf *IMB_half_x(struct ImBuf *ibuf1)
        float af,rf,gf,bf, *p1f, *_p1f, *destf;
        int do_rect, do_float;
 
-       if (ibuf1==NULL) return (0);
-       if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (0);
+       if (ibuf1==NULL) return (NULL);
+       if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (NULL);
 
        do_rect= (ibuf1->rect != NULL);
        do_float= (ibuf1->rect_float != NULL);
@@ -68,7 +68,7 @@ struct ImBuf *IMB_half_x(struct ImBuf *ibuf1)
        if (ibuf1->x <= 1) return(IMB_dupImBuf(ibuf1));
        
        ibuf2 = IMB_allocImBuf((ibuf1->x)/2, ibuf1->y, ibuf1->depth, ibuf1->flags);
-       if (ibuf2==NULL) return (0);
+       if (ibuf2==NULL) return (NULL);
 
        _p1 = (uchar *) ibuf1->rect;
        dest=(uchar *) ibuf2->rect;
@@ -122,14 +122,14 @@ struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1)
        int *p1,*dest, i, col, do_rect, do_float;
        float *p1f, *destf;
 
-       if (ibuf1==NULL) return (0);
-       if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (0);
+       if (ibuf1==NULL) return (NULL);
+       if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (NULL);
 
        do_rect= (ibuf1->rect != NULL);
        do_float= (ibuf1->rect_float != NULL);
        
        ibuf2 = IMB_allocImBuf(2 * ibuf1->x , ibuf1->y , ibuf1->depth, ibuf1->flags);
-       if (ibuf2==NULL) return (0);
+       if (ibuf2==NULL) return (NULL);
 
        p1 = (int *) ibuf1->rect;
        dest=(int *) ibuf2->rect;
@@ -159,8 +159,8 @@ struct ImBuf *IMB_double_x(struct ImBuf *ibuf1)
 {
        struct ImBuf *ibuf2;
 
-       if (ibuf1==NULL) return (0);
-       if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (0);
+       if (ibuf1==NULL) return (NULL);
+       if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (NULL);
 
        ibuf2 = IMB_double_fast_x(ibuf1);
 
@@ -179,15 +179,15 @@ struct ImBuf *IMB_half_y(struct ImBuf *ibuf1)
 
        p1= p2= NULL;
        p1f= p2f= NULL;
-       if (ibuf1==NULL) return (0);
-       if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (0);
+       if (ibuf1==NULL) return (NULL);
+       if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (NULL);
        if (ibuf1->y <= 1) return(IMB_dupImBuf(ibuf1));
 
        do_rect= (ibuf1->rect != NULL);
        do_float= (ibuf1->rect_float != NULL);
 
        ibuf2 = IMB_allocImBuf(ibuf1->x , (ibuf1->y) / 2 , ibuf1->depth, ibuf1->flags);
-       if (ibuf2==NULL) return (0);
+       if (ibuf2==NULL) return (NULL);
 
        _p1 = (uchar *) ibuf1->rect;
        dest=(uchar *) ibuf2->rect;
@@ -248,14 +248,14 @@ struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1)
        short x,y;
        int do_rect, do_float;
 
-       if (ibuf1==NULL) return (0);
-       if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (0);
+       if (ibuf1==NULL) return (NULL);
+       if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (NULL);
 
        do_rect= (ibuf1->rect != NULL);
        do_float= (ibuf1->rect_float != NULL);
 
        ibuf2 = IMB_allocImBuf(ibuf1->x , 2 * ibuf1->y , ibuf1->depth, ibuf1->flags);
-       if (ibuf2==NULL) return (0);
+       if (ibuf2==NULL) return (NULL);
 
        p1 = (int *) ibuf1->rect;
        dest1= (int *) ibuf2->rect;
@@ -282,8 +282,8 @@ struct ImBuf *IMB_double_y(struct ImBuf *ibuf1)
 {
        struct ImBuf *ibuf2;
 
-       if (ibuf1==NULL) return (0);
-       if (ibuf1->rect==NULL) return (0);
+       if (ibuf1==NULL) return (NULL);
+       if (ibuf1->rect==NULL) return (NULL);
 
        ibuf2 = IMB_double_fast_y(ibuf1);
        
@@ -345,14 +345,14 @@ struct ImBuf *IMB_onehalf(struct ImBuf *ibuf1)
 {
        struct ImBuf *ibuf2;
 
-       if (ibuf1==NULL) return (0);
-       if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (0);
+       if (ibuf1==NULL) return (NULL);
+       if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (NULL);
        
        if (ibuf1->x <= 1) return(IMB_half_y(ibuf1));
        if (ibuf1->y <= 1) return(IMB_half_x(ibuf1));
        
        ibuf2=IMB_allocImBuf((ibuf1->x)/2, (ibuf1->y)/2, ibuf1->depth, ibuf1->flags);
-       if (ibuf2==NULL) return (0);
+       if (ibuf2==NULL) return (NULL);
        
        imb_onehalf_no_alloc(ibuf2, ibuf1);
        
@@ -838,7 +838,7 @@ static struct ImBuf *scaledownx(struct ImBuf *ibuf, int newx)
        nval[0]=  nval[1]= nval[2]= nval[3]= 0.0f;
        nvalf[0]=nvalf[1]=nvalf[2]=nvalf[3]= 0.0f;
        
-       if (ibuf==NULL) return(0);
+       if (ibuf==NULL) return(NULL);
        if (ibuf->rect==NULL && ibuf->rect_float==NULL) return (ibuf);
 
        if (ibuf->rect) {
@@ -962,7 +962,7 @@ static struct ImBuf *scaledowny(struct ImBuf *ibuf, int newy)
        nval[0]=  nval[1]= nval[2]= nval[3]= 0.0f;
        nvalf[0]=nvalf[1]=nvalf[2]=nvalf[3]= 0.0f;
 
-       if (ibuf==NULL) return(0);
+       if (ibuf==NULL) return(NULL);
        if (ibuf->rect==NULL && ibuf->rect_float==NULL) return (ibuf);
 
        if (ibuf->rect) {
@@ -1094,7 +1094,7 @@ static struct ImBuf *scaleupx(struct ImBuf *ibuf, int newx)
        val_g = nval_g = diff_g = val_r = nval_r = diff_r = 0;
        val_af = nval_af = diff_af = val_bf = nval_bf = diff_bf = 0;
        val_gf = nval_gf = diff_gf = val_rf = nval_rf = diff_rf = 0;
-       if (ibuf==NULL) return(0);
+       if (ibuf==NULL) return(NULL);
        if (ibuf->rect==NULL && ibuf->rect_float==NULL) return (ibuf);
 
        if (ibuf->rect) {
@@ -1261,7 +1261,7 @@ static struct ImBuf *scaleupy(struct ImBuf *ibuf, int newy)
        val_g = nval_g = diff_g = val_r = nval_r = diff_r = 0;
        val_af = nval_af = diff_af = val_bf = nval_bf = diff_bf = 0;
        val_gf = nval_gf = diff_gf = val_rf = nval_rf = diff_rf = 0;
-       if (ibuf==NULL) return(0);
+       if (ibuf==NULL) return(NULL);
        if (ibuf->rect==NULL && ibuf->rect_float==NULL) return (ibuf);
 
        if (ibuf->rect) {
@@ -1453,7 +1453,7 @@ static void scalefast_Z_ImBuf(ImBuf *ibuf, short newx, short newy)
 
 struct ImBuf *IMB_scaleImBuf(struct ImBuf * ibuf, unsigned int newx, unsigned int newy)
 {
-       if (ibuf==NULL) return (0);
+       if (ibuf==NULL) return (NULL);
        if (ibuf->rect==NULL && ibuf->rect_float==NULL) return (ibuf);
        
        if (newx == ibuf->x && newy == ibuf->y) { return ibuf; }
@@ -1490,7 +1490,7 @@ struct ImBuf *IMB_scalefastImBuf(struct ImBuf *ibuf, unsigned int newx, unsigned
        rect = NULL; _newrect = NULL; newrect = NULL;
        rectf = NULL; _newrectf = NULL; newrectf = NULL;
 
-       if (ibuf==NULL) return(0);
+       if (ibuf==NULL) return(NULL);
        if (ibuf->rect) do_rect = 1;
        if (ibuf->rect_float) do_float = 1;
        if (do_rect==0 && do_float==0) return(ibuf);
index 4f1f756a861f058868e88b4707272c9b9bae4e55..f334409133fc4ed76c91070a03f54951656ac109 100644 (file)
@@ -196,8 +196,8 @@ static int dumptarga(struct ImBuf * ibuf, FILE * file)
        int size;
        uchar *rect;
 
-       if (ibuf == 0) return (0);
-       if (ibuf->rect == 0) return (0);
+       if (ibuf == NULL) return (0);
+       if (ibuf->rect == NULL) return (0);
 
        size = ibuf->x * ibuf->y;
        rect = (uchar *) ibuf->rect;
@@ -366,8 +366,8 @@ static void decodetarga(struct ImBuf *ibuf, unsigned char *mem, size_t mem_size,
        unsigned int *rect;
        uchar * cp = (uchar *) &col;
        
-       if (ibuf == 0) return;
-       if (ibuf->rect == 0) return;
+       if (ibuf == NULL) return;
+       if (ibuf->rect == NULL) return;
 
        size = ibuf->x * ibuf->y;
        rect = ibuf->rect;
@@ -477,8 +477,8 @@ static void ldtarga(struct ImBuf * ibuf,unsigned char * mem, size_t mem_size, in
        unsigned int *rect;
        uchar * cp = (uchar *) &col;
 
-       if (ibuf == 0) return;
-       if (ibuf->rect == 0) return;
+       if (ibuf == NULL) return;
+       if (ibuf->rect == NULL) return;
 
        size = ibuf->x * ibuf->y;
        rect = ibuf->rect;
@@ -535,12 +535,12 @@ struct ImBuf *imb_loadtarga(unsigned char *mem, size_t mem_size, int flags)
        unsigned int *rect, *cmap= NULL, mincol= 0, maxcol= 0;
        uchar * cp = (uchar *) &col;
        
-       if (checktarga(&tga,mem) == 0) return(0);
+       if (checktarga(&tga,mem) == 0) return(NULL);
 
        if (flags & IB_test) ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,tga.pixsize, 0);
        else ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,(tga.pixsize + 0x7) & ~0x7, IB_rect);
 
-       if (ibuf == 0) return(0);
+       if (ibuf == NULL) return(NULL);
        ibuf->ftype = TGA;
        ibuf->profile = IB_PROFILE_SRGB;
        mem = mem + 18 + tga.numid;
index 626c3ec6d705108579870ad9ffe24b1d32ebc384..a9abcec9169b4a18517103936dbb1914d33cf359 100644 (file)
@@ -272,7 +272,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im
                        tsize = 1;
                        break;
                default:
-                       return 0; /* unknown size */
+                       return NULL; /* unknown size */
        }
 
        uri_from_filename(path, uri);
@@ -286,7 +286,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im
                }
                if (size == THB_FAIL) {
                        img = IMB_allocImBuf(1,1,32, IB_rect | IB_metadata);
-                       if (!img) return 0;
+                       if (!img) return NULL;
                } else {
                        if (THB_SOURCE_IMAGE == source || THB_SOURCE_BLEND == source) {
                                
@@ -322,7 +322,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im
                                stat(path, &info);
                                BLI_snprintf(mtime, sizeof(mtime), "%ld", info.st_mtime);
                        }
-                       if (!img) return 0;             
+                       if (!img) return NULL;
 
                        if (img->x > img->y) {
                                scaledx = (float)tsize;
@@ -365,7 +365,7 @@ ImBuf* IMB_thumb_read(const char* path, ThumbSize size)
 {
        char thumb[FILE_MAX];
        char uri[FILE_MAX*3+8];
-       ImBuf *img = 0;
+       ImBuf *img = NULL;
 
        if (!uri_from_filename(path,uri)) {
                return NULL;
@@ -428,13 +428,13 @@ ImBuf* IMB_thumb_manage(const char* path, ThumbSize size, ThumbSource source)
                                if (!IMB_metadata_get_field(img, "Thumb::MTime", mtime, 40)) {
                                        /* illegal thumb, forget it! */
                                        IMB_freeImBuf(img);
-                                       img = 0;
+                                       img = NULL;
                                } else {
                                        time_t t = atol(mtime);
                                        if (st.st_mtime != t) {
                                                /* recreate all thumbs */
                                                IMB_freeImBuf(img);
-                                               img = 0;
+                                               img = NULL;
                                                IMB_thumb_delete(path, THB_NORMAL);
                                                IMB_thumb_delete(path, THB_LARGE);
                                                IMB_thumb_delete(path, THB_FAIL);
@@ -445,7 +445,7 @@ ImBuf* IMB_thumb_manage(const char* path, ThumbSize size, ThumbSource source)
                                                        if (img) {
                                                                /* we don't need failed thumb anymore */
                                                                IMB_freeImBuf(img);
-                                                               img = 0;
+                                                               img = NULL;
                                                        }
                                                }
                                        }
@@ -458,7 +458,7 @@ ImBuf* IMB_thumb_manage(const char* path, ThumbSize size, ThumbSource source)
                                        if (img) {
                                                /* we don't need failed thumb anymore */
                                                IMB_freeImBuf(img);
-                                               img = 0;
+                                               img = NULL;
                                        }
                                }
                        }
index 3b6aafaffa0d0442a4931d4f4ea9e75fdb6d93cb..967effaeac35ea2f9d55bc8ba003bcf1cbefc095 100644 (file)
@@ -170,7 +170,7 @@ static int le_int(int temp)
 int DNA_elem_array_size(const char *astr, int len)
 {
        int a, mul=1;
-       char str[100], *cp=0;
+       char str[100], *cp= NULL;
 
        memcpy(str, astr, len+1);
 
@@ -259,7 +259,7 @@ static void printstruct(SDNA *sdna, short strnr)
 static short *findstruct_name(SDNA *sdna, const char *str)
 {
        int a;
-       short *sp=0;
+       short *sp= NULL;
 
 
        for(a=0; a<sdna->nr_structs; a++) {
@@ -269,12 +269,12 @@ static short *findstruct_name(SDNA *sdna, const char *str)
                if(strcmp( sdna->types[ sp[0] ], str )==0) return sp;
        }
        
-       return 0;
+       return NULL;
 }
 
 int DNA_struct_find_nr(SDNA *sdna, const char *str)
 {
-       short *sp=0;
+       short *sp= NULL;
        int a;
 
        if(sdna->lastfind<sdna->nr_structs) {
@@ -808,12 +808,12 @@ static char *find_elem(SDNA *sdna, const char *type, const char *name, short *ol
                                return olddata;
                        }
                        
-                       return 0;
+                       return NULL;
                }
                
                olddata+= len;
        }
-       return 0;
+       return NULL;
 }
 
 static void reconstruct_elem(SDNA *newsdna, SDNA *oldsdna, char *type, const char *name, char *curdata, short *old, char *olddata)
@@ -999,7 +999,7 @@ void DNA_struct_switch_endian(SDNA *oldsdna, int oldSDNAnr, char *data)
                /* test: is type a struct? */
                if(spc[0]>=firststructtypenr  &&  !ispointer(name)) {
                        /* where does the old data start (is there one?) */
-                       cpo= find_elem(oldsdna, type, name, spo, data, 0);
+                       cpo= find_elem(oldsdna, type, name, spo, data, NULL);
                        if(cpo) {
                                oldSDNAnr= DNA_struct_find_nr(oldsdna, type);
                                
index fa39c197c7b933e59b6b75f5a00c4a4e08617cf8..95579147dbbec0c6788001a14b1d30d339f05119 100644 (file)
@@ -194,15 +194,15 @@ ModifierTypeInfo modifierType_Armature = {
        /* deformMatrices */    deformMatrices,
        /* deformVertsEM */     deformVertsEM,
        /* deformMatricesEM */  deformMatricesEM,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
+       /* freeData */          NULL,
        /* isDisabled */        isDisabled,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index 0a8caee52411855243924c05b0bcda9f24ddac7e..3a34b048aa3ed8b7fec21eeee7f2b55782696c8d 100644 (file)
@@ -811,19 +811,19 @@ ModifierTypeInfo modifierType_Array = {
                                                        | eModifierTypeFlag_AcceptsCVs,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
        /* applyModifierEM */   applyModifierEM,
        /* initData */          initData,
-       /* requiredDataMask */  0,
-       /* freeData */          0,
-       /* isDisabled */        0,
+       /* requiredDataMask */  NULL,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index a1bd3abc176661bd718f1f89aaffa43bb822c96c..323ed71dd747210b4ee4f2c4dff7a6eff18e0c52 100644 (file)
@@ -135,19 +135,19 @@ ModifierTypeInfo modifierType_Bevel = {
                                                        | eModifierTypeFlag_EnableInEditmode,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
        /* applyModifierEM */   applyModifierEM,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
-       /* isDisabled */        0,
-       /* updateDepgraph */    0,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
+       /* updateDepgraph */    NULL,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index d4be9d3d03a14da748b1fe11dc248a4bf72f4573..ec6387f44af9b1324684d1f3304615a5562820fe 100644 (file)
@@ -34,6 +34,7 @@
  *  \ingroup modifiers
  */
 
+#include <stdio.h>
 
 #include "DNA_object_types.h"
 
@@ -144,19 +145,19 @@ ModifierTypeInfo modifierType_Boolean = {
                                                        | eModifierTypeFlag_UsesPointCache,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
-       /* applyModifierEM */   0,
-       /* initData */          0,
+       /* applyModifierEM */   NULL,
+       /* initData */          NULL,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
+       /* freeData */          NULL,
        /* isDisabled */        isDisabled,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index 68e9e173ee687ac093f7912b14af2697a634617b..91d89aaa5d18caca7dcee1ccce1fc76349e008ce 100644 (file)
@@ -624,18 +624,18 @@ ModifierTypeInfo modifierType_Cast = {
 
        /* copyData */          copyData,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
+       /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
+       /* freeData */          NULL,
        /* isDisabled */        isDisabled,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index 999349dca7f6b9b332eb29e8d0f7eeb88d86aab1..30ddb3f7b9c3ab5d873e0a0d604db6d4e5078ac7 100644 (file)
@@ -201,19 +201,19 @@ ModifierTypeInfo modifierType_Cloth = {
                                                        | eModifierTypeFlag_Single,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
-       /* applyModifierEM */   0,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
-       /* isDisabled */        0,
+       /* isDisabled */        NULL,
        /* updateDepgraph */    updateDepgraph,
        /* dependsOnTime */     dependsOnTime,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index e1371b3b86c2dff3993eb796b7ebcfa0ae4fa6fe..2ed66f2374b2091001c1d8be611f98dc54b5ae93 100644 (file)
@@ -250,20 +250,20 @@ ModifierTypeInfo modifierType_Collision = {
        /* flags */             eModifierTypeFlag_AcceptsMesh
                                                        | eModifierTypeFlag_Single,
 
-       /* copyData */          0,
+       /* copyData */          NULL,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
-       /* requiredDataMask */  0,
+       /* requiredDataMask */  NULL,
        /* freeData */          freeData,
-       /* isDisabled */        0,
-       /* updateDepgraph */    0,
+       /* isDisabled */        NULL,
+       /* updateDepgraph */    NULL,
        /* dependsOnTime */     dependsOnTime,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index 84fee7b51021a676acbd7396c9094a376d13ca22..ecd10250c009c08d8805f3f328299df2ea41b308 100644 (file)
@@ -148,18 +148,18 @@ ModifierTypeInfo modifierType_Curve = {
 
        /* copyData */          copyData,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
+       /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
+       /* freeData */          NULL,
        /* isDisabled */        isDisabled,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index 64d6b72a176d7f1718c4acd23c8c6bef1e03a868..ba9dbfc31ad204ef9b40fadc6d9cba213d43bae8 100644 (file)
@@ -203,19 +203,19 @@ ModifierTypeInfo modifierType_Decimate = {
        /* type */              eModifierTypeType_Nonconstructive,
        /* flags */             eModifierTypeFlag_AcceptsMesh,
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
-       /* applyModifierEM */   0,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
-       /* requiredDataMask */  0,
-       /* freeData */          0,
-       /* isDisabled */        0,
-       /* updateDepgraph */    0,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* requiredDataMask */  NULL,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
+       /* updateDepgraph */    NULL,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index 2ab6921dc8a5ce14c0b73014bfeae1308392654c..d303f3d25169402026a0e23d848f6fcbb14e5366 100644 (file)
@@ -362,14 +362,14 @@ ModifierTypeInfo modifierType_Displace = {
 
        /* copyData */          copyData,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
+       /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
+       /* freeData */          NULL,
        /* isDisabled */        isDisabled,
        /* updateDepgraph */    updateDepgraph,
        /* dependsOnTime */     dependsOnTime,
index d2dcd0ffeafb0b7a444bc17f1538c8eab624b5b8..1de95b67cadb72bee8f3c038d7e844cbb72fe106 100644 (file)
@@ -1289,19 +1289,19 @@ ModifierTypeInfo modifierType_EdgeSplit = {
                                                        | eModifierTypeFlag_EnableInEditmode,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
        /* applyModifierEM */   applyModifierEM,
        /* initData */          initData,
-       /* requiredDataMask */  0,
-       /* freeData */          0,
-       /* isDisabled */        0,
-       /* updateDepgraph */    0,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* requiredDataMask */  NULL,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
+       /* updateDepgraph */    NULL,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index aea6997c5d541748f8bf6402a3ae43efca56c4f2..292d7f7a65cfec5b08866f976c0058eaf25cacf1 100644 (file)
@@ -62,7 +62,7 @@ static void initData(ModifierData *md)
 {
        ExplodeModifierData *emd= (ExplodeModifierData*) md;
 
-       emd->facepa=0;
+       emd->facepa= NULL;
        emd->flag |= eExplodeFlag_Unborn+eExplodeFlag_Alive+eExplodeFlag_Dead;
 }
 static void freeData(ModifierData *md)
@@ -76,7 +76,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        ExplodeModifierData *emd= (ExplodeModifierData*) md;
        ExplodeModifierData *temd= (ExplodeModifierData*) target;
 
-       temd->facepa = 0;
+       temd->facepa = NULL;
        temd->flag = emd->flag;
        temd->protect = emd->protect;
        temd->vgroup = emd->vgroup;
@@ -101,12 +101,12 @@ static void createFacepa(ExplodeModifierData *emd,
                                                DerivedMesh *dm)
 {
        ParticleSystem *psys=psmd->psys;
-       MFace *fa=0, *mface=0;
-       MVert *mvert = 0;
+       MFace *fa=NULL, *mface=NULL;
+       MVert *mvert = NULL;
        ParticleData *pa;
        KDTree *tree;
        float center[3], co[3];
-       int *facepa=0,*vertpa=0,totvert=0,totface=0,totpart=0;
+       int *facepa=NULL,*vertpa=NULL,totvert=0,totface=0,totpart=0;
        int i,p,v1,v2,v3,v4=0;
 
        mvert = dm->getVertArray(dm);
@@ -148,7 +148,7 @@ static void createFacepa(ExplodeModifierData *emd,
        /* make tree of emitter locations */
        tree=BLI_kdtree_new(totpart);
        for(p=0,pa=psys->particles; p<totpart; p++,pa++){
-               psys_particle_on_dm(psmd->dm,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,0,0,0,0,0);
+               psys_particle_on_dm(psmd->dm,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,NULL,NULL,NULL,NULL,NULL);
                BLI_kdtree_insert(tree, p, co, NULL);
        }
        BLI_kdtree_balance(tree);
@@ -776,14 +776,14 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
   DerivedMesh *to_explode)
 {
        DerivedMesh *explode, *dm=to_explode;
-       MFace *mf=0, *mface;
+       MFace *mf= NULL, *mface;
        ParticleSettings *part=psmd->psys->part;
-       ParticleSimulationData sim= {0};
+       ParticleSimulationData sim= {NULL};
        ParticleData *pa=NULL, *pars=psmd->psys->particles;
        ParticleKey state;
        EdgeHash *vertpahash;
        EdgeHashIterator *ehi;
-       float *vertco=0, imat[4][4];
+       float *vertco= NULL, imat[4][4];
        float loc0[3], nor[3];
        float cfra;
        /* float timestep; */
@@ -870,7 +870,7 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
                        pa= pars+i;
 
                        /* get particle state */
-                       psys_particle_on_emitter(psmd,part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc0,nor,0,0,0,0);
+                       psys_particle_on_emitter(psmd,part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc0,nor,NULL,NULL,NULL,NULL);
                        mul_m4_v3(ob->obmat,loc0);
 
                        state.time=cfra;
@@ -960,7 +960,7 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
 static ParticleSystemModifierData * findPrecedingParticlesystem(Object *ob, ModifierData *emd)
 {
        ModifierData *md;
-       ParticleSystemModifierData *psmd=0;
+       ParticleSystemModifierData *psmd= NULL;
 
        for (md=ob->modifiers.first; emd!=md; md=md->next){
                if(md->type==eModifierType_ParticleSystem)
@@ -980,12 +980,12 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
        if(psmd){
                ParticleSystem * psys=psmd->psys;
 
-               if(psys==0 || psys->totpart==0) return derivedData;
-               if(psys->part==0 || psys->particles==0) return derivedData;
-               if(psmd->dm==0) return derivedData;
+               if(psys==NULL || psys->totpart==0) return derivedData;
+               if(psys->part==NULL || psys->particles==NULL) return derivedData;
+               if(psmd->dm==NULL) return derivedData;
 
                /* 1. find faces to be exploded if needed */
-               if(emd->facepa==0
+               if(emd->facepa == NULL
                                 || psmd->flag&eParticleSystemFlag_Pars
                                 || emd->flag&eExplodeFlag_CalcFaces
                                 || MEM_allocN_len(emd->facepa)/sizeof(int) != dm->getNumFaces(dm))
@@ -1023,19 +1023,19 @@ ModifierTypeInfo modifierType_Explode = {
        /* type */              eModifierTypeType_Nonconstructive,
        /* flags */             eModifierTypeFlag_AcceptsMesh,
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
-       /* applyModifierEM */   0,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
-       /* isDisabled */        0,
-       /* updateDepgraph */    0,
+       /* isDisabled */        NULL,
+       /* updateDepgraph */    NULL,
        /* dependsOnTime */     dependsOnTime,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index 1cce9863ccc4755470a2b44b004f744a9913c882..354dc33ffe0f266e6e50bbb8d6a6bfae80b994b3 100644 (file)
@@ -147,19 +147,19 @@ ModifierTypeInfo modifierType_Fluidsim = {
                                                        | eModifierTypeFlag_Single,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
-       /* applyModifierEM */   0,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
-       /* requiredDataMask */  0,
+       /* requiredDataMask */  NULL,
        /* freeData */          freeData,
-       /* isDisabled */        0,
+       /* isDisabled */        NULL,
        /* updateDepgraph */    updateDepgraph,
        /* dependsOnTime */     dependsOnTime,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index 2a85378f987a11d6d9d27ccaa6da420fc159aa59..4dbe781ca13bceec200f04102585f481e547b651 100644 (file)
@@ -289,18 +289,18 @@ ModifierTypeInfo modifierType_Hook = {
                                                        | eModifierTypeFlag_SupportsEditmode,
        /* copyData */          copyData,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
+       /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
        /* isDisabled */        isDisabled,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index 22427d043384e159f561d4d33fb0ce331aff92c3..694f8fb3e52daf2c5442e19c87a2a69642992eaa 100644 (file)
@@ -142,18 +142,18 @@ ModifierTypeInfo modifierType_Lattice = {
                                                        | eModifierTypeFlag_SupportsEditmode,
        /* copyData */          copyData,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
+       /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
-       /* initData */          0,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
+       /* initData */          NULL,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
+       /* freeData */          NULL,
        /* isDisabled */        isDisabled,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index 9519e5b913163fc72f17f08f917928cb3a88c8f2..b36d6848533bf86026536f2bc2bfbbe4e7e87351 100644 (file)
@@ -404,19 +404,19 @@ ModifierTypeInfo modifierType_Mask = {
        /* flags */             eModifierTypeFlag_AcceptsMesh|eModifierTypeFlag_SupportsMapping|eModifierTypeFlag_SupportsEditmode,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
-       /* applyModifierEM */   0,
-       /* initData */          0,
+       /* applyModifierEM */   NULL,
+       /* initData */          NULL,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
-       /* isDisabled */        0,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index a6b4a5dabcd10c116d77c88d24d23742c89882bc..fa9976b1ad6dc1ff24b12e59832548e01bf6e710 100644 (file)
@@ -450,18 +450,18 @@ ModifierTypeInfo modifierType_MeshDeform = {
 
        /* copyData */          copyData,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
+       /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
        /* isDisabled */        isDisabled,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index cf31e86a2f536a77040b6c6f03873abc62fdf3c0..b1c765e5c9b835c115a5941a6e9d8becfa14cb8a 100644 (file)
@@ -348,19 +348,19 @@ ModifierTypeInfo modifierType_Mirror = {
                                                        | eModifierTypeFlag_AcceptsCVs,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
        /* applyModifierEM */   applyModifierEM,
        /* initData */          initData,
-       /* requiredDataMask */  0,
-       /* freeData */          0,
-       /* isDisabled */        0,
+       /* requiredDataMask */  NULL,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index 7653511da10bf360631906a05374cc5976b2c80e..def2020f35f1944ab2316e667794878317849bc4 100644 (file)
@@ -115,19 +115,19 @@ ModifierTypeInfo modifierType_Multires = {
                                                        | eModifierTypeFlag_RequiresOriginalData,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
-       /* applyModifierEM */   0,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
-       /* requiredDataMask */  0,
-       /* freeData */          0,
-       /* isDisabled */        0,
-       /* updateDepgraph */    0,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* requiredDataMask */  NULL,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
+       /* updateDepgraph */    NULL,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index bebb9b5877476a1f2a1ffebb50b1806efde2769c..489733c8480080c0c8dedfdccb824159886c807f 100644 (file)
@@ -38,8 +38,7 @@
  *  \ingroup modifiers
  */
 
-
-
+#include <stdio.h>
 
 #include "BLI_utildefines.h"
 
@@ -62,20 +61,20 @@ ModifierTypeInfo modifierType_None = {
        /* flags */             eModifierTypeFlag_AcceptsMesh
                                                        | eModifierTypeFlag_AcceptsCVs,
 
-       /* copyData */          0,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
-       /* initData */          0,
-       /* requiredDataMask */  0,
-       /* freeData */          0,
+       /* copyData */          NULL,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
+       /* initData */          NULL,
+       /* requiredDataMask */  NULL,
+       /* freeData */          NULL,
        /* isDisabled */        isDisabled,
-       /* updateDepgraph */    0,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* updateDepgraph */    NULL,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index 1fa0ff7beed87a07bee27f2b5e923bace15276fa..4b6e4bd024153e0bc860d72c538cd22ca6a438a7 100644 (file)
@@ -115,8 +115,8 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
        DerivedMesh *dm = derivedData, *result;
        ParticleInstanceModifierData *pimd= (ParticleInstanceModifierData*) md;
        ParticleSimulationData sim;
-       ParticleSystem * psys=0;
-       ParticleData *pa=0, *pars=0;
+       ParticleSystem *psys= NULL;
+       ParticleData *pa= NULL, *pars= NULL;
        MFace *mface, *orig_mface;
        MVert *mvert, *orig_mvert;
        int i,totvert, totpart=0, totface, maxvert, maxface, first_particle=0;
@@ -127,13 +127,13 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
        trackneg=((ob->trackflag>2)?1:0);
 
        if(pimd->ob==ob){
-               pimd->ob=0;
+               pimd->ob= NULL;
                return derivedData;
        }
 
        if(pimd->ob){
                psys = BLI_findlink(&pimd->ob->particlesystem,pimd->psys-1);
-               if(psys==0 || psys->totpart==0)
+               if(psys==NULL || psys->totpart==0)
                        return derivedData;
        }
        else return derivedData;
@@ -274,7 +274,7 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
                                if(psys->part->childtype==PART_CHILD_PARTICLES)
                                        pa=psys->particles+(psys->child+i/totface-psys->totpart)->parent;
                                else
-                                       pa=0;
+                                       pa= NULL;
                        }
                        else
                                pa=pars+i/totface;
@@ -283,7 +283,7 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
                        if(psys->part->childtype==PART_CHILD_PARTICLES)
                                pa=psys->particles+(psys->child+i/totface)->parent;
                        else
-                               pa=0;
+                               pa= NULL;
                }
 
                if(pa){
@@ -335,19 +335,19 @@ ModifierTypeInfo modifierType_ParticleInstance = {
                                                        | eModifierTypeFlag_EnableInEditmode,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
        /* applyModifierEM */   applyModifierEM,
        /* initData */          initData,
-       /* requiredDataMask */  0,
-       /* freeData */          0,
-       /* isDisabled */        0,
+       /* requiredDataMask */  NULL,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
        /* updateDepgraph */    updateDepgraph,
        /* dependsOnTime */     dependsOnTime,
-       /* dependsOnNormals */  0,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index a23a53335efd76dbbd404f89202ee22e6c4d4b01..1a6cbc4781f15cc6c5b31e0f470f7d70d6f49998 100644 (file)
@@ -53,8 +53,8 @@
 static void initData(ModifierData *md) 
 {
        ParticleSystemModifierData *psmd= (ParticleSystemModifierData*) md;
-       psmd->psys= 0;
-       psmd->dm=0;
+       psmd->psys= NULL;
+       psmd->dm= NULL;
        psmd->totdmvert= psmd->totdmedge= psmd->totdmface= 0;
 }
 static void freeData(ModifierData *md)
@@ -64,7 +64,7 @@ static void freeData(ModifierData *md)
        if(psmd->dm){
                psmd->dm->needsFree = 1;
                psmd->dm->release(psmd->dm);
-               psmd->dm=0;
+               psmd->dm = NULL;
        }
 
        /* ED_object_modifier_remove may have freed this first before calling
@@ -77,7 +77,7 @@ static void copyData(ModifierData *md, ModifierData *target)
        ParticleSystemModifierData *psmd= (ParticleSystemModifierData*) md;
        ParticleSystemModifierData *tpsmd= (ParticleSystemModifierData*) target;
 
-       tpsmd->dm = 0;
+       tpsmd->dm = NULL;
        tpsmd->totdmvert = tpsmd->totdmedge = tpsmd->totdmface = 0;
        //tpsmd->facepa = 0;
        tpsmd->flag = psmd->flag;
@@ -131,7 +131,7 @@ static void deformVerts(ModifierData *md, Object *ob,
 {
        DerivedMesh *dm = derivedData;
        ParticleSystemModifierData *psmd= (ParticleSystemModifierData*) md;
-       ParticleSystem * psys=0;
+       ParticleSystem * psys= NULL;
        int needsFree=0;
 
        if(ob->particlesystem.first)
@@ -142,7 +142,7 @@ static void deformVerts(ModifierData *md, Object *ob,
        if(!psys_check_enabled(ob, psys))
                return;
 
-       if(dm==0) {
+       if(dm==NULL) {
                dm= get_dm(ob, NULL, NULL, vertexCos, 1);
 
                if(!dm)
@@ -228,18 +228,18 @@ ModifierTypeInfo modifierType_ParticleSystem = {
 
        /* copyData */          copyData,
        /* deformVerts */       deformVerts,
-       /* deformVertsEM */     0 /* deformVertsEM */ ,
-       /* deformMatrices */    0,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformVertsEM */     NULL /* deformVertsEM */ ,
+       /* deformMatrices */    NULL,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
-       /* isDisabled */        0,
-       /* updateDepgraph */    0,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* isDisabled */        NULL,
+       /* updateDepgraph */    NULL,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index ac48a9682a1d278909100c507de1839c8186f7bd..076c09cc51a40c1deda9feb47436604d9c6b58b5 100644 (file)
@@ -888,19 +888,19 @@ ModifierTypeInfo modifierType_Screw = {
                                                        | eModifierTypeFlag_EnableInEditmode,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
        /* applyModifierEM */   applyModifierEM,
        /* initData */          initData,
-       /* requiredDataMask */  0,
-       /* freeData */          0,
-       /* isDisabled */        0,
+       /* requiredDataMask */  NULL,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
        /* updateDepgraph */    updateDepgraph,
        /* dependsOnTime */     dependsOnTime,
-       /* dependsOnNormals */  0,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index cfd12833a38cac9faaa163ecfaeb786b476c00bf..e1fc4bc969f0ce32de706607cbffcdc6a217957f 100644 (file)
@@ -172,18 +172,18 @@ ModifierTypeInfo modifierType_Shrinkwrap = {
 
        /* copyData */          copyData,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
+       /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
+       /* freeData */          NULL,
        /* isDisabled */        isDisabled,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index 0150322ae8cbfd4a7d700c6ea55a2d23599d9f17..fc13eafa866a7e29ffbc41efede4548f6d75997d 100644 (file)
@@ -381,18 +381,18 @@ ModifierTypeInfo modifierType_SimpleDeform = {
 
        /* copyData */          copyData,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
+       /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
-       /* isDisabled */        0,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
-       /* foreachIDLink */     0,
+       /* foreachIDLink */     NULL,
 };
index 46f0483dbffefb42a1b80f6c2a8e550c29cffd26..351a86624bea1bf4de9eb3956beddb6397b5a858 100644 (file)
@@ -159,18 +159,18 @@ ModifierTypeInfo modifierType_Smoke = {
 
        /* copyData */          copyData,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
-       /* requiredDataMask */  0,
+       /* requiredDataMask */  NULL,
        /* freeData */          freeData,
-       /* isDisabled */        0,
+       /* isDisabled */        NULL,
        /* updateDepgraph */    updateDepgraph,
        /* dependsOnTime */     dependsOnTime,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index 526b54d1cf8c01c70fb64e5680b7d95bccc40c0c..8aca9ec82c31b9576332a88a8d0ad9931c5a9207 100644 (file)
@@ -261,18 +261,18 @@ ModifierTypeInfo modifierType_Smooth = {
 
        /* copyData */          copyData,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
+       /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
+       /* freeData */          NULL,
        /* isDisabled */        isDisabled,
-       /* updateDepgraph */    0,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* updateDepgraph */    NULL,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index 0abf2fa6281c1d91cc250ee90bbc5234341bfbc0..25996286735d9c8127710d4f41d04e9aa1a6787e 100644 (file)
  *  \ingroup modifiers
  */
 
+#include <stdio.h>
 
 #include "DNA_scene_types.h"
 
 #include "BLI_utildefines.h"
 
-
 #include "BKE_cdderivedmesh.h"
 #include "BKE_particle.h"
 #include "BKE_softbody.h"
@@ -71,20 +71,20 @@ ModifierTypeInfo modifierType_Softbody = {
                                                        | eModifierTypeFlag_RequiresOriginalData
                                                        | eModifierTypeFlag_Single,
 
-       /* copyData */          0,
+       /* copyData */          NULL,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
-       /* initData */          0,
-       /* requiredDataMask */  0,
-       /* freeData */          0,
-       /* isDisabled */        0,
-       /* updateDepgraph */    0,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
+       /* initData */          NULL,
+       /* requiredDataMask */  NULL,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
+       /* updateDepgraph */    NULL,
        /* dependsOnTime */     dependsOnTime,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index 823cc03cff20f9946335a753a54e8c604b4d0115..0d0e81925f73873dcf6223e97d8fdbbfbf4a49fd 100644 (file)
@@ -137,19 +137,19 @@ ModifierTypeInfo modifierType_Subsurf = {
                                                        | eModifierTypeFlag_AcceptsCVs,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
        /* applyModifierEM */   applyModifierEM,
        /* initData */          initData,
-       /* requiredDataMask */  0,
+       /* requiredDataMask */  NULL,
        /* freeData */          freeData,
        /* isDisabled */        isDisabled,
-       /* updateDepgraph */    0,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* updateDepgraph */    NULL,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index e0bdb063331c90a13d6951f04a6d092c81702d3e..382358b179ebd223a7801d24678af87d7470d96a 100644 (file)
@@ -176,20 +176,20 @@ ModifierTypeInfo modifierType_Surface = {
        /* flags */             eModifierTypeFlag_AcceptsMesh
                                                        | eModifierTypeFlag_NoUserAdd,
 
-       /* copyData */          0,
+       /* copyData */          NULL,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
-       /* requiredDataMask */  0,
+       /* requiredDataMask */  NULL,
        /* freeData */          freeData,
-       /* isDisabled */        0,
-       /* updateDepgraph */    0,
+       /* isDisabled */        NULL,
+       /* updateDepgraph */    NULL,
        /* dependsOnTime */     dependsOnTime,
-       /* dependsOnNormals */  0,
-       /* foreachObjectLink */ 0,
-       /* foreachIDLink */     0,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     NULL,
 };
index 1a572984fe3a0edf352386e2ff56390cbe5eabf9..abe874580389dbfa06e8fe0b87da623c59e1a836 100644 (file)
@@ -417,19 +417,19 @@ ModifierTypeInfo modifierType_UVProject = {
                                                        | eModifierTypeFlag_EnableInEditmode,
 
        /* copyData */          copyData,
-       /* deformVerts */       0,
-       /* deformMatrices */    0,
-       /* deformVertsEM */     0,
-       /* deformMatricesEM */  0,
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     applyModifier,
        /* applyModifierEM */   applyModifierEM,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
-       /* isDisabled */        0,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
        /* updateDepgraph */    updateDepgraph,
-       /* dependsOnTime */     0,
-       /* dependsOnNormals */  0,
+       /* dependsOnTime */     NULL,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
        /* foreachIDLink */     foreachIDLink,
 };
index 575c454c98016915a6bddadb74a8eeb67fd5e1e7..b4e94157e9a47725a5d309b706a1d6c9b78ccf0f 100644 (file)
@@ -457,18 +457,18 @@ ModifierTypeInfo modifierType_Wave = {
                                                        | eModifierTypeFlag_SupportsEditmode,
        /* copyData */          copyData,
        /* deformVerts */       deformVerts,
-       /* deformMatrices */    0,
+       /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
-       /* deformMatricesEM */  0,
-       /* applyModifier */     0,
-       /* applyModifierEM */   0,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
-       /* freeData */          0,
-       /* isDisabled */        0,
+       /* freeData */          NULL,
+       /* isDisabled */        NULL,
        /* updateDepgraph */    updateDepgraph,
        /* dependsOnTime */     dependsOnTime,
-       /* dependsOnNormals */  0,
+       /* dependsOnNormals */  NULL,
        /* foreachObjectLink */ foreachObjectLink,
        /* foreachIDLink */     foreachIDLink,
 };
index 49a92659c439f5d50199bd3a10290c28e7fba137..63a3a7ae15cc344b32fe9e275802633be8b232f0 100644 (file)
@@ -71,7 +71,7 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(o
                                if(in[1] && in[1]->hasinput)
                                        tex_input_vec(target->nor, in[1], &params, cdata->thread);
                                else
-                                       target->nor = 0;
+                                       target->nor = NULL;
                        }
                }
        }
@@ -80,7 +80,7 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(o
 static void unique_name(bNode *node)
 {
        TexNodeOutput *tno = (TexNodeOutput *)node->storage;
-       char *new_name = 0;
+       char *new_name = NULL;
        int new_len = 0;
        int suffix;
        bNode *i;