forked from bartvdbraak/blender
Remove the OBJECT_OT_test_multires operator.
Originated in r35213, appears to have been some test for multires in BMesh.
This commit is contained in:
parent
d3ffa53f78
commit
24b676e370
@ -159,7 +159,6 @@ void OBJECT_OT_multires_external_pack(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_meshdeform_bind(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_explode_refresh(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_ocean_bake(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_test_multires(struct wmOperatorType *ot);
|
||||
|
||||
/* object_constraint.c */
|
||||
void OBJECT_OT_constraint_add(struct wmOperatorType *ot);
|
||||
|
@ -1176,64 +1176,6 @@ void OBJECT_OT_multires_reshape(wmOperatorType *ot)
|
||||
edit_modifier_properties(ot);
|
||||
}
|
||||
|
||||
static int multires_test_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *ob= ED_object_active_context(C);
|
||||
Mesh *me = ob->data;
|
||||
MPoly *mp;
|
||||
MDisps *mdisps;
|
||||
int i, x = RNA_int_get(op->ptr, "x"), y = RNA_int_get(op->ptr, "y");
|
||||
|
||||
if (ob->type != OB_MESH || !me)
|
||||
return OPERATOR_CANCELLED;
|
||||
|
||||
mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
|
||||
if (!mdisps)
|
||||
return OPERATOR_CANCELLED;
|
||||
|
||||
mp = me->mpoly;
|
||||
for (i=0; i<me->totpoly; i++, mp++) {
|
||||
MLoop *ml;
|
||||
int j;
|
||||
|
||||
ml = me->mloop + mp->loopstart;
|
||||
for (j=0; j<mp->totloop; j++, ml++) {
|
||||
MLoop *ml_prev = ME_POLY_LOOP_PREV(me->mloop, mp, j);
|
||||
MLoop *ml_next = ME_POLY_LOOP_NEXT(me->mloop, mp, j);
|
||||
|
||||
if ((me->mvert[ml->v].flag&SELECT) && (me->mvert[ml_prev->v].flag&SELECT) && (me->mvert[ml_next->v].flag&SELECT)) {
|
||||
MDisps *md = mdisps + mp->loopstart + j;
|
||||
int res = sqrt(md->totdisp);
|
||||
|
||||
if (x >= res) x = res-1;
|
||||
if (y >= res) y = res-1;
|
||||
|
||||
md->disps[y*res + x][2] += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void OBJECT_OT_test_multires(wmOperatorType *ot)
|
||||
{
|
||||
ot->name= "Multires Object Mode Test";
|
||||
ot->description= "";
|
||||
ot->idname= "OBJECT_OT_test_multires";
|
||||
|
||||
ot->poll= multires_poll;
|
||||
ot->exec= multires_test_exec;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
RNA_def_int(ot->srna, "x", 0, 0, 100, "x", "x", 0, 100);
|
||||
RNA_def_int(ot->srna, "y", 0, 0, 100, "y", "y", 0, 100);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************** multires save external operator *********************/
|
||||
|
@ -214,8 +214,6 @@ void ED_operatortypes_object(void)
|
||||
|
||||
WM_operatortype_append(OBJECT_OT_bake_image);
|
||||
WM_operatortype_append(OBJECT_OT_drop_named_material);
|
||||
|
||||
WM_operatortype_append(OBJECT_OT_test_multires);
|
||||
}
|
||||
|
||||
void ED_operatormacros_object(void)
|
||||
|
Loading…
Reference in New Issue
Block a user