diff options
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index d78b6675eea..de9e3db25b8 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -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 *********************/ |