Revision: 40251
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40251
Author:   ender79
Date:     2011-09-16 05:21:24 +0000 (Fri, 16 Sep 2011)
Log Message:
-----------
Make split tool use splitop (instead of dupe & del). Fix split op output.

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/bmesh/operators/bmesh_dupeops.c
    branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c

Modified: branches/bmesh/blender/source/blender/bmesh/operators/bmesh_dupeops.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/bmesh_dupeops.c       
2011-09-16 04:28:38 UTC (rev 40250)
+++ branches/bmesh/blender/source/blender/bmesh/operators/bmesh_dupeops.c       
2011-09-16 05:21:24 UTC (rev 40251)
@@ -390,7 +390,7 @@
        BMO_Exec_Op(bm, &delop);
 
        /*now we make our outputs by copying the dupe outputs*/
-       BMO_CopySlot(&dupeop, splitop, "newout", "geom");
+       BMO_CopySlot(&dupeop, splitop, "newout", "geomout");
        BMO_CopySlot(&dupeop, splitop, "boundarymap",
                     "boundarymap");
        BMO_CopySlot(&dupeop, splitop, "isovertmap",

Modified: branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c    
2011-09-16 04:28:38 UTC (rev 40250)
+++ branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c    
2011-09-16 05:21:24 UTC (rev 40251)
@@ -3566,7 +3566,7 @@
        }
 
        EDBM_CallOpf(em, wmop, "del geom=%hvef context=%i", BM_SELECT, 
DEL_VERTS);
-       
+
        BM_Compute_Normals(bmnew);
        BMO_CallOpf(bmnew, "bmesh_to_mesh mesh=%p object=%p", 
basenew->object->data, basenew->object);
                
@@ -3884,31 +3884,16 @@
 {
        Object *ob= CTX_data_edit_object(C);
        BMEditMesh *em= ((Mesh*)ob->data)->edit_btmesh;
-       BMOperator bmopDupe, bmopDel;
+       BMOperator bmop;
 
-       /*Duplicate selected geometry*/
-       EDBM_InitOpf(em, &bmopDupe, op, "dupe geom=%hvef", BM_SELECT);
-       BMO_Exec_Op(em->bm, &bmopDupe);
-
-       /*Duplicated geometry starts out selected. Deselect all duplicated
-         geometry to return to the original selection.*/
-       BMO_UnHeaderFlag_Buffer(em->bm, &bmopDupe, "newout", BM_SELECT, BM_ALL);
-
-       /*Delete selected faces*/
-       EDBM_InitOpf(em, &bmopDel, op, "del geom=%hvef context=%i", BM_SELECT, 
DEL_FACES);
-       BMO_Exec_Op(em->bm, &bmopDel);
-       if (!EDBM_FinishOp(em, &bmopDel, op, 1)) {
-               /*Also clean up the dupe op*/
-               EDBM_FinishOp(em, &bmopDupe, op, 1);
+       EDBM_InitOpf(em, &bmop, op, "split geom=%hvef", BM_SELECT);
+       BMO_Exec_Op(em->bm, &bmop);
+       BM_clear_flag_all(em->bm, BM_SELECT);
+       BMO_HeaderFlag_Buffer(em->bm, &bmop, "geomout", BM_SELECT, BM_ALL);
+       if (!EDBM_FinishOp(em, &bmop, op, 1)) {
                return OPERATOR_CANCELLED;
        }
 
-       /*Clear prior selection and select the dupliated geometry*/
-       BM_clear_flag_all(em->bm, BM_SELECT);
-       BMO_HeaderFlag_Buffer(em->bm, &bmopDupe, "newout", BM_SELECT, BM_ALL);
-       if (!EDBM_FinishOp(em, &bmopDupe, op, 1))
-               return OPERATOR_CANCELLED;
-
        /*Geometry has changed, need to recalc normals and looptris*/
        BMEdit_RecalcTesselation(em);
        EDBM_RecalcNormals(em);
@@ -4662,7 +4647,7 @@
        MPoly *mpoly, *mp;
        MTexPoly *mtexpoly;
        MLoopUV *luv, *mloopuv;
-       MLoopCol *mloopcol;
+       /*MLoopCol *mloopcol;*/
        FILE *file, *matfile;
        int *face_mat_group;
        struct {Material *mat; MTexPoly poly; int end;} **matlists;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to