remove use of deprecated struct members

- editmesh smooth & subdivide were using old mirror axis flag still.
- removed colbits from outliner and object code.
- commented some other parts of the code which access deprecated members and aren't called anywhere.
This commit is contained in:
Campbell Barton 2011-12-04 06:39:35 +00:00
parent 31ff21d735
commit cbd5b492b1
13 changed files with 18 additions and 49 deletions

@ -52,8 +52,10 @@ int group_is_animated(struct Object *parent, struct Group *group);
void group_tag_recalc(struct Group *group); void group_tag_recalc(struct Group *group);
void group_handle_recalc_and_update(struct Scene *scene, struct Object *parent, struct Group *group); void group_handle_recalc_and_update(struct Scene *scene, struct Object *parent, struct Group *group);
#if 0 /* UNUSED */
struct Object *group_get_member_with_action(struct Group *group, struct bAction *act); struct Object *group_get_member_with_action(struct Group *group, struct bAction *act);
void group_relink_nla_objects(struct Object *ob); void group_relink_nla_objects(struct Object *ob);
#endif
#endif #endif

@ -123,8 +123,10 @@ void unlink_group(Group *group)
for(psys=ob->particlesystem.first; psys; psys=psys->next){ for(psys=ob->particlesystem.first; psys; psys=psys->next){
if(psys->part->dup_group==group) if(psys->part->dup_group==group)
psys->part->dup_group= NULL; psys->part->dup_group= NULL;
#if 0 /* not used anymore, only keps for readfile.c, no need to account for this */
if(psys->part->eff_group==group) if(psys->part->eff_group==group)
psys->part->eff_group= NULL; psys->part->eff_group= NULL;
#endif
} }
} }
@ -381,6 +383,7 @@ void group_handle_recalc_and_update(Scene *scene, Object *UNUSED(parent), Group
} }
} }
#if 0
Object *group_get_member_with_action(Group *group, bAction *act) Object *group_get_member_with_action(Group *group, bAction *act)
{ {
GroupObject *go; GroupObject *go;
@ -432,3 +435,4 @@ void group_relink_nla_objects(Object *ob)
} }
} }
#endif

@ -106,9 +106,7 @@ void unlink_mesh(Mesh *me)
} }
if(me->key) { if(me->key) {
me->key->id.us--; me->key->id.us--;
if (me->key->id.us == 0 && me->key->ipo )
me->key->ipo->id.us--;
} }
me->key= NULL; me->key= NULL;

@ -1397,7 +1397,6 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
ob->matbits= NULL; ob->matbits= NULL;
if ((target->totcol) && (target->mat) && OB_TYPE_SUPPORT_MATERIAL(ob->type)) { if ((target->totcol) && (target->mat) && OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
int i; int i;
ob->colbits = target->colbits;
ob->actcol= target->actcol; ob->actcol= target->actcol;
ob->totcol= target->totcol; ob->totcol= target->totcol;

@ -394,10 +394,6 @@ Scene *add_scene(const char *name)
sce->r.simplify_shadowsamples= 16; sce->r.simplify_shadowsamples= 16;
sce->r.simplify_aosss= 1.0f; sce->r.simplify_aosss= 1.0f;
sce->r.cineonblack= 95;
sce->r.cineonwhite= 685;
sce->r.cineongamma= 1.7f;
sce->r.border.xmin= 0.0f; sce->r.border.xmin= 0.0f;
sce->r.border.ymin= 0.0f; sce->r.border.ymin= 0.0f;
sce->r.border.xmax= 1.0f; sce->r.border.xmax= 1.0f;

@ -479,17 +479,11 @@ void unlink_text(Main *bmain, Text *text)
bScreen *scr; bScreen *scr;
ScrArea *area; ScrArea *area;
SpaceLink *sl; SpaceLink *sl;
Scene *scene;
Object *ob; Object *ob;
bController *cont; bController *cont;
bConstraint *con; bConstraint *con;
short update; short update;
/* dome */
for(scene=bmain->scene.first; scene; scene=scene->id.next)
if(scene->r.dometext == text)
scene->r.dometext = NULL;
for(ob=bmain->object.first; ob; ob=ob->id.next) { for(ob=bmain->object.first; ob; ob=ob->id.next) {
/* game controllers */ /* game controllers */
for(cont=ob->controllers.first; cont; cont=cont->next) { for(cont=ob->controllers.first; cont; cont=cont->next) {

@ -703,7 +703,7 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
dflag |= GP_DRAWDATA_ONLYV2D|GP_DRAWDATA_IEDITHACK; dflag |= GP_DRAWDATA_ONLYV2D|GP_DRAWDATA_IEDITHACK;
} }
break; break;
#if 0 /* removed since 2.5x, needs to be added back */
case SPACE_SEQ: /* sequence */ case SPACE_SEQ: /* sequence */
{ {
SpaceSeq *sseq= (SpaceSeq *)sa->spacedata.first; SpaceSeq *sseq= (SpaceSeq *)sa->spacedata.first;
@ -728,7 +728,7 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
dflag |= GP_DRAWDATA_ONLYI2D; dflag |= GP_DRAWDATA_ONLYI2D;
} }
break; break;
#endif
default: /* for spacetype not yet handled */ default: /* for spacetype not yet handled */
offsx= 0; offsx= 0;
offsy= 0; offsy= 0;

@ -4151,20 +4151,10 @@ static int smooth_vertex(bContext *C, wmOperator *op)
for (eve= em->verts.first; eve; eve= eve->next) { for (eve= em->verts.first; eve; eve= eve->next) {
if(eve->f & SELECT) { if(eve->f & SELECT) {
switch(mmd->axis){ if (mmd->flag & MOD_MIR_AXIS_X && fabsf(eve->co[0]) < mmd->tolerance) eve->f2 |= 1;
case 0: if (mmd->flag & MOD_MIR_AXIS_Y && fabsf(eve->co[1]) < mmd->tolerance) eve->f2 |= 2;
if (fabsf(eve->co[0]) < mmd->tolerance) if (mmd->flag & MOD_MIR_AXIS_Z && fabsf(eve->co[2]) < mmd->tolerance) eve->f2 |= 4;
eve->f2 |= 1;
break;
case 1:
if (fabsf(eve->co[1]) < mmd->tolerance)
eve->f2 |= 2;
break;
case 2:
if (fabsf(eve->co[2]) < mmd->tolerance)
eve->f2 |= 4;
break;
}
} }
} }
} }

@ -2666,20 +2666,11 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float smooth, float
if(mmd->flag & MOD_MIR_CLIPPING) { if(mmd->flag & MOD_MIR_CLIPPING) {
for (eve= em->verts.first; eve; eve= eve->next) { for (eve= em->verts.first; eve; eve= eve->next) {
eve->f2= 0; eve->f2= 0;
switch(mmd->axis){
case 0: if (mmd->flag & MOD_MIR_AXIS_X && fabsf(eve->co[0]) < mmd->tolerance) eve->f2 |= 1;
if (fabsf(eve->co[0]) < mmd->tolerance) if (mmd->flag & MOD_MIR_AXIS_Y && fabsf(eve->co[1]) < mmd->tolerance) eve->f2 |= 2;
eve->f2 |= 1; if (mmd->flag & MOD_MIR_AXIS_Z && fabsf(eve->co[2]) < mmd->tolerance) eve->f2 |= 4;
break;
case 1:
if (fabsf(eve->co[1]) < mmd->tolerance)
eve->f2 |= 2;
break;
case 2:
if (fabsf(eve->co[2]) < mmd->tolerance)
eve->f2 |= 4;
break;
}
} }
} }
} }

@ -497,7 +497,6 @@ int join_mesh_exec(bContext *C, wmOperator *op)
MEM_freeN(matar); MEM_freeN(matar);
ob->totcol= me->totcol= totcol; ob->totcol= me->totcol= totcol;
ob->colbits= 0;
if (matmap) MEM_freeN(matmap); if (matmap) MEM_freeN(matmap);

@ -237,7 +237,6 @@ static int tree_element_active_material(bContext *C, Scene *scene, SpaceOops *so
if(set) { if(set) {
ob->actcol= te->index+1; ob->actcol= te->index+1;
ob->matbits[te->index]= 1; // make ob material active too ob->matbits[te->index]= 1; // make ob material active too
ob->colbits |= (1<<te->index);
} }
else { else {
if(ob->actcol == te->index+1) if(ob->actcol == te->index+1)
@ -249,7 +248,6 @@ static int tree_element_active_material(bContext *C, Scene *scene, SpaceOops *so
if(set) { if(set) {
ob->actcol= te->index+1; ob->actcol= te->index+1;
ob->matbits[te->index]= 0; // make obdata material active too ob->matbits[te->index]= 0; // make obdata material active too
ob->colbits &= ~(1<<te->index);
} }
else { else {
if(ob->actcol == te->index+1) if(ob->actcol == te->index+1)

@ -105,7 +105,6 @@ static SpaceLink *sequencer_new(const bContext *C)
sseq= MEM_callocN(sizeof(SpaceSeq), "initsequencer"); sseq= MEM_callocN(sizeof(SpaceSeq), "initsequencer");
sseq->spacetype= SPACE_SEQ; sseq->spacetype= SPACE_SEQ;
sseq->zoom= 4;
sseq->chanshown = 0; sseq->chanshown = 0;
sseq->view = SEQ_VIEW_SEQUENCE; sseq->view = SEQ_VIEW_SEQUENCE;
sseq->mainb = SEQ_DRAW_IMG_IMBUF; sseq->mainb = SEQ_DRAW_IMG_IMBUF;

@ -64,7 +64,6 @@ static void copyData(ModifierData *md, ModifierData *target)
MirrorModifierData *mmd = (MirrorModifierData*) md; MirrorModifierData *mmd = (MirrorModifierData*) md;
MirrorModifierData *tmmd = (MirrorModifierData*) target; MirrorModifierData *tmmd = (MirrorModifierData*) target;
tmmd->axis = mmd->axis;
tmmd->flag = mmd->flag; tmmd->flag = mmd->flag;
tmmd->tolerance = mmd->tolerance; tmmd->tolerance = mmd->tolerance;
tmmd->mirror_ob = mmd->mirror_ob; tmmd->mirror_ob = mmd->mirror_ob;