merge with 2.5 at r18598, also made the test 2.5 operator use the (naive) edge subdiv...
authorJoseph Eagar <joeedh@gmail.com>
Wed, 21 Jan 2009 05:23:39 +0000 (05:23 +0000)
committerJoseph Eagar <joeedh@gmail.com>
Wed, 21 Jan 2009 05:23:39 +0000 (05:23 +0000)
1  2 
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_ops.c

index 8272ef1107084b6acf85834372ce47598de63549,200c6a173ea5f3e4b649f44e12d63740cd7dfaab..38d579681a00eb4d95b97f850186913f9f3f9f9e
@@@ -3320,50 -3319,6 +3320,51 @@@ void MESH_OT_de_select_all(wmOperatorTy
        ot->poll= ED_operator_editmesh;
  }
  
-                       BMO_Init_Op(&op, BMOP_SPLIT);
-                       BMO_HeaderFlag_To_Slot(bm, &op, BMOP_SPLIT_MULTIN, BM_SELECT, BM_ALL);
 +static int bmesh_test_exec(bContext *C, wmOperator *op)
 +{
 +      Object *obedit= CTX_data_edit_object(C);
 +      EditMesh *em= ((Mesh *)obedit->data)->edit_mesh;
 +      EditMesh *em2;
 +      BMesh *bm;
 +
 +      bm = editmesh_to_bmesh(em);
 +
 +      /*do stuff here, call bmop's.*/
 +      //BMOP_DupeFromFlag(bm, BM_ALL, BM_SELECT);
 +      {
 +                      BMOperator op;
 +
++                      BMO_Init_Op(&op, BMOP_ESUBDIVIDE);
++                      BMO_HeaderFlag_To_Slot(bm, &op, BMOP_ESUBDIVIDE_EDGES, BM_SELECT, BM_EDGE);
 +
 +                      BMO_Exec_Op(bm, &op);
 +                      BMO_Finish_Op(bm, &op);
++                      
 +      }
 +      em2 = bmesh_to_editmesh(bm);
 +      
 +      /*free em's data, then copy the contents of the em2 struct
 +        to em, then free the em2 struct.*/
 +      free_editMesh(em);
 +      *em = *em2;
 +      MEM_freeN(em2); 
 +      
 +      BM_Free_Mesh(bm);
 +      WM_event_add_notifier(C, NC_OBJECT|ND_DRAW|ND_TRANSFORM|ND_GEOM_SELECT, obedit);
 +      return OPERATOR_FINISHED;
 +}
 +
 +void MESH_OT_bmesh_test(wmOperatorType *ot)
 +{
 +      /* identifiers */
 +      ot->name= "bmesh test op";
 +      ot->idname= "MESH_OT_bmesh_test";
 +      
 +      /* api callbacks */
 +      ot->exec= bmesh_test_exec;
 +      ot->poll= ED_operator_editmesh;
 +}
 +
  /* ******************** **************** */
  
  void EM_select_more(EditMesh *em)