editmesh accessor functions. most editmesh access now goes through:
[blender.git] / source / blender / editors / mesh / mesh_ops.c
index 5c108c501b666d7ace5a0e866431d25eba191dc5..1c9b17313ec9c7e151c0569f69119c4ffd816e72 100644 (file)
 static int mesh_add_duplicate_exec(bContext *C, wmOperator *op)
 {
        Object *ob= CTX_data_edit_object(C);
-       EditMesh *em= ((Mesh *)ob->data)->edit_mesh;
+       EditMesh *em= EM_GetEditMesh(ob->data);
 
        adduplicateflag(em, SELECT);
        
+       EM_EndEditMesh(ob->data, em);
        return OPERATOR_FINISHED;
 }