remove doubles uses an operator property for the merge distance. it no longer report...
authorJoseph Eagar <joeedh@gmail.com>
Mon, 14 Sep 2009 06:06:01 +0000 (06:06 +0000)
committerJoseph Eagar <joeedh@gmail.com>
Mon, 14 Sep 2009 06:06:01 +0000 (06:06 +0000)
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_ops.c
source/blender/makesdna/DNA_modifier_types.h

index 9c8e8e11e860aa9f4833ea2c042207cacadd3ffb..7698faf31784e013d3784f8d78fa71b492ab1180 100644 (file)
@@ -486,13 +486,14 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
        EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
        char msg[100];
 
-       int cnt = removedoublesflag(em,1,0,ts->doublimit);
+       int cnt = removedoublesflag(em,1,0,RNA_float_get(op->ptr, "limit"));
 
+       /*XXX this messes up last operator panel
        if(cnt)
        {
                sprintf(msg, "Removed %d vertices", cnt);
                BKE_report(op->reports, RPT_INFO, msg);
-       }
+       }*/
 
        DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
        WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
@@ -514,6 +515,8 @@ void MESH_OT_remove_doubles(wmOperatorType *ot)
 
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+       RNA_def_float(ot->srna, "limit", 0.00001f, 0.000001f, 50.0f, "Merge Threshold", "Minimum distance between merged verts", 0.00001f, 10.0f);
 }
 
 // XXX is this needed?
index 3cdf1d4781737860b74756a702a15ce6f5480ccd..5be39a3e4f1337a7e85ed6f5d7e6c3ac1a00ea20 100644 (file)
@@ -335,6 +335,12 @@ void ED_operatortypes_mesh(void)
        WM_operatortype_macro_define(ot, "MESH_OT_extrude");
        WM_operatortype_macro_define(ot, "TFM_OT_translate");
 
+       /*combining operators with invoke and exec portions doesn't work yet.
+       
+       ot= WM_operatortype_append_macro("MESH_OT_loopcut", "Loopcut", OPTYPE_UNDO|OPTYPE_REGISTER);
+       WM_operatortype_macro_define(ot, "MESH_OT_edgering_select");
+       WM_operatortype_macro_define(ot, "MESH_OT_subdivide");
+       */
 }
 
 /* note mesh keymap also for other space? */
@@ -343,6 +349,8 @@ void ED_keymap_mesh(wmWindowManager *wm)
        ListBase *keymap= WM_keymap_listbase(wm, "EditMesh", 0, 0);
        wmKeymapItem *kmi;
        
+       //WM_keymap_add_item(keymap, "MESH_OT_loopcut", RKEY, KM_PRESS, KM_CTRL, 0);
+
        /* selecting */
        /* standard mouse selection goes via space_view3d */
        WM_keymap_add_item(keymap, "MESH_OT_loop_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
@@ -354,7 +362,7 @@ void ED_keymap_mesh(wmWindowManager *wm)
        RNA_boolean_set(kmi->ptr, "extend", 1);
 
        WM_keymap_add_item(keymap, "MESH_OT_select_shortest_path", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
-       
+
        WM_keymap_add_item(keymap, "MESH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "MESH_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "MESH_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
index d58488ce82d909743d12d9c76bbeee726c245957..54433fd4254508c30a7d80ff666f9b2fec9c1e22 100644 (file)
@@ -471,7 +471,6 @@ typedef struct BooleanModifierData {
 
 #define MOD_MDEF_INVERT_VGROUP (1<<0)
 #define MOD_MDEF_DYNAMIC_BIND  (1<<1)
-#define MOD_MDEF_USE_FINAL             (1<<2)
 
 typedef struct MDefInfluence {
        int vertex;