Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-05 13:29:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-05 13:29:10 +0300
commitc7fccc84bf59bed95bdf13207c40f7a1d1711d24 (patch)
tree1be0895f8cab3c07e00c218b601952458c83d5d0 /source/blender/editors
parent10373238c104cc7a4c62d54c4fc39366ad11b1a2 (diff)
use NULL rather then 0 for pointer assignments & comparison, modifier, imbuf & editors.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_regions.c2
-rw-r--r--source/blender/editors/interface/interface_templates.c16
-rw-r--r--source/blender/editors/interface/view2d.c2
-rw-r--r--source/blender/editors/object/object_add.c10
-rw-r--r--source/blender/editors/object/object_bake.c2
-rw-r--r--source/blender/editors/object/object_edit.c6
-rw-r--r--source/blender/editors/object/object_lattice.c2
-rw-r--r--source/blender/editors/object/object_modifier.c2
-rw-r--r--source/blender/editors/object/object_relations.c4
-rw-r--r--source/blender/editors/object/object_select.c10
-rw-r--r--source/blender/editors/physics/particle_object.c2
-rw-r--r--source/blender/editors/render/render_preview.c4
-rw-r--r--source/blender/editors/screen/area.c2
-rw-r--r--source/blender/editors/screen/screen_edit.c10
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c8
-rw-r--r--source/blender/editors/space_action/action_edit.c6
-rw-r--r--source/blender/editors/space_action/action_select.c14
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c4
-rw-r--r--source/blender/editors/space_console/console_ops.c2
-rw-r--r--source/blender/editors/space_file/file_draw.c2
-rw-r--r--source/blender/editors/space_file/filelist.c24
-rw-r--r--source/blender/editors/space_file/filesel.c4
-rw-r--r--source/blender/editors/space_graph/graph_select.c4
-rw-r--r--source/blender/editors/space_image/image_buttons.c2
-rw-r--r--source/blender/editors/space_nla/nla_edit.c2
-rw-r--r--source/blender/editors/space_node/node_draw.c2
-rw-r--r--source/blender/editors/space_outliner/outliner.c8
30 files changed, 82 insertions, 82 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 5590c43bd44..930999f05ff 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -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;
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index dd60f0bbd72..3737cb7e380 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -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");
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 5ddbac89596..8c397d9c14f 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -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();
}
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index d1488e3d0f0..c3fb3ca5ddd 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -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) {
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 31ef6f55fdd..b4a358150e8 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -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;
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 31bcfb10ee6..a8d0b93fa60 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -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;
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index cea8512af24..72bf3b52b74 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -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;
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 1267697b139..b57935bc392 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -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;
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index d3baea4c180..baf88ba1d9a 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -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;
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 49cb9ac9e6f..52486677e87 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -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;
}
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index c8e73399407..8ec95e9b107 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -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;
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 33f81bb7d16..a1ef042f8e4 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -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)
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index b9c79547c77..883f2ee7128 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -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 */
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index b298c306699..44a7a7c48b3 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -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);
}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index e7368e075f9..70bb4d48296 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -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;
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index afa2e07f37d..6c696ac357b 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -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;
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index d7fdf42fa62..3f37238c40f 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -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;
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index c3522d0b596..b0979817c88 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -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);
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 473e2ac3b96..bb1aa1b6444 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -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 */
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 7f5abbd210f..f9687e99c87 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -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 */
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 3224821e744..9190d5aff54 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -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 */
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index 5636c40cef2..97c2d9e3eb4 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -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 */
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 7d9eec891b8..98bd6c0e70b 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -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;
}
}
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 88287b6a7da..bd188d07a86 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -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;
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index cc741392de2..87ffc2075c9 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -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;
}
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index 2cc4bb81bf3..18f2b4944e7 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -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 */
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 141a62307c0..8b3ceecc7da 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -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);
}
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 35a9c97967d..300d38732ec 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -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)
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index a1540337ff9..ebbb33631a9 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -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 */
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 439f9e6fde7..765cd360f96 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -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);