use NULL rather then 0 for pointer assignments & comparison, modifier, imbuf & editors.
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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");
|
||||
|
@@ -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) {
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
|
@@ -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 */
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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 */
|
||||
|
@@ -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 */
|
||||
|
||||
|
@@ -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 */
|
||||
|
@@ -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 */
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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 */
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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 */
|
||||
|
@@ -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);
|
||||
|
@@ -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,
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -34,12 +34,12 @@
|
||||
* \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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -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], ¶ms, 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;
|
||||
|
Reference in New Issue
Block a user