diff options
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 0129e709505..6bd64e1e2f5 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -93,14 +93,14 @@ void open_plugin_tex(PluginTex *pit) int (*version)(void); /* init all the happy variables */ - pit->doit= 0; - pit->pname= 0; - pit->stnames= 0; - pit->varstr= 0; - pit->result= 0; - pit->cfra= 0; + pit->doit= NULL; + pit->pname= NULL; + pit->stnames= NULL; + pit->varstr= NULL; + pit->result= NULL; + pit->cfra= NULL; pit->version= 0; - pit->instance_init= 0; + pit->instance_init= NULL; /* clear the error list */ PIL_dynlib_get_error_as_string(NULL); @@ -113,12 +113,12 @@ void open_plugin_tex(PluginTex *pit) pit->handle= PIL_dynlib_open(pit->name); if(test_dlerr(pit->name, pit->name)) return; - if (pit->handle != 0) { + if (pit->handle != NULL) { /* find the address of the version function */ version= (int (*)(void)) PIL_dynlib_find_symbol(pit->handle, "plugin_tex_getversion"); if (test_dlerr(pit->name, "plugin_tex_getversion")) return; - if (version != 0) { + if (version != NULL) { pit->version= version(); if( pit->version >= 2 && pit->version <=6) { int (*info_func)(PluginInfo *); @@ -168,8 +168,8 @@ PluginTex *add_plugin_tex(char *str) strcpy(pit->name, str); open_plugin_tex(pit); - if(pit->doit==0) { - if(pit->handle==0) {;} //XXX error("no plugin: %s", str); + if(pit->doit==NULL) { + if(pit->handle==NULL) {;} //XXX error("no plugin: %s", str); else {;} //XXX error("in plugin: %s", str); MEM_freeN(pit); return NULL; @@ -193,7 +193,7 @@ PluginTex *add_plugin_tex(char *str) void free_plugin_tex(PluginTex *pit) { - if(pit==0) return; + if(pit==NULL) return; /* no PIL_dynlib_close: same plugin can be opened multiple times, 1 handle */ MEM_freeN(pit); @@ -619,7 +619,7 @@ void default_mtex(MTex *mtex) { mtex->texco= TEXCO_ORCO; mtex->mapto= MAP_COL; - mtex->object= 0; + mtex->object= NULL; mtex->projx= PROJ_X; mtex->projy= PROJ_Y; mtex->projz= PROJ_Z; @@ -630,7 +630,7 @@ void default_mtex(MTex *mtex) mtex->size[0]= 1.0; mtex->size[1]= 1.0; mtex->size[2]= 1.0; - mtex->tex= 0; + mtex->tex= NULL; mtex->texflag= MTEX_3TAP_BUMP | MTEX_BUMP_OBJECTSPACE; mtex->colormodel= 0; mtex->r= 1.0; @@ -681,7 +681,7 @@ void default_mtex(MTex *mtex) /* ------------------------------------------------------------------------- */ -MTex *add_mtex() +MTex *add_mtex(void) { MTex *mtex; @@ -743,7 +743,7 @@ Tex *copy_texture(Tex *tex) texn= copy_libblock(tex); if(texn->type==TEX_IMAGE) id_us_plus((ID *)texn->ima); - else texn->ima= 0; + else texn->ima= NULL; #if 0 // XXX old animation system id_us_plus((ID *)texn->ipo); @@ -786,19 +786,19 @@ void make_local_texture(Tex *tex) * - mixed: make copy */ - if(tex->id.lib==0) return; + if(tex->id.lib==NULL) return; /* special case: ima always local immediately */ if(tex->ima) { - tex->ima->id.lib= 0; + tex->ima->id.lib= NULL; tex->ima->id.flag= LIB_LOCAL; - new_id(0, (ID *)tex->ima, 0); + new_id(NULL, (ID *)tex->ima, NULL); } if(tex->id.us==1) { - tex->id.lib= 0; + tex->id.lib= NULL; tex->id.flag= LIB_LOCAL; - new_id(0, (ID *)tex, 0); + new_id(NULL, (ID *)tex, NULL); return; } @@ -843,9 +843,9 @@ void make_local_texture(Tex *tex) } if(local && lib==0) { - tex->id.lib= 0; + tex->id.lib= NULL; tex->id.flag= LIB_LOCAL; - new_id(0, (ID *)tex, 0); + new_id(NULL, (ID *)tex, NULL); } else if(local && lib) { texn= copy_texture(tex); @@ -855,7 +855,7 @@ void make_local_texture(Tex *tex) while(ma) { for(a=0; a<MAX_MTEX; a++) { if(ma->mtex[a] && ma->mtex[a]->tex==tex) { - if(ma->id.lib==0) { + if(ma->id.lib==NULL) { ma->mtex[a]->tex= texn; texn->id.us++; tex->id.us--; @@ -868,7 +868,7 @@ void make_local_texture(Tex *tex) while(la) { for(a=0; a<MAX_MTEX; a++) { if(la->mtex[a] && la->mtex[a]->tex==tex) { - if(la->id.lib==0) { + if(la->id.lib==NULL) { la->mtex[a]->tex= texn; texn->id.us++; tex->id.us--; @@ -881,7 +881,7 @@ void make_local_texture(Tex *tex) while(wrld) { for(a=0; a<MAX_MTEX; a++) { if(wrld->mtex[a] && wrld->mtex[a]->tex==tex) { - if(wrld->id.lib==0) { + if(wrld->id.lib==NULL) { wrld->mtex[a]->tex= texn; texn->id.us++; tex->id.us--; @@ -893,7 +893,7 @@ void make_local_texture(Tex *tex) br= bmain->brush.first; while(br) { if(br->mtex.tex==tex) { - if(br->id.lib==0) { + if(br->id.lib==NULL) { br->mtex.tex= texn; texn->id.us++; tex->id.us--; @@ -943,8 +943,8 @@ Tex *give_current_object_texture(Object *ob) Material *ma; Tex *tex= NULL; - if(ob==0) return 0; - if(ob->totcol==0 && !(ob->type==OB_LAMP)) return 0; + if(ob==NULL) return NULL; + if(ob->totcol==0 && !(ob->type==OB_LAMP)) return NULL; if(ob->type==OB_LAMP) { tex= give_current_lamp_texture(ob->data); @@ -1124,7 +1124,7 @@ Tex *give_current_world_texture(World *world) MTex *mtex= NULL; Tex *tex= NULL; - if(!world) return 0; + if(!world) return NULL; mtex= world->mtex[(int)(world->texact)]; if(mtex) tex= mtex->tex; @@ -1175,7 +1175,7 @@ Tex *give_current_particle_texture(ParticleSettings *part) MTex *mtex= NULL; Tex *tex= NULL; - if(!part) return 0; + if(!part) return NULL; mtex= part->mtex[(int)(part->texact)]; if(mtex) tex= mtex->tex; |