Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2009-09-14 10:06:01 +0400
committerJoseph Eagar <joeedh@gmail.com>2009-09-14 10:06:01 +0400
commit894c1e98ad398d3970ea928c0a9db8f34e5dbef4 (patch)
treef9081e9d7db71c556d84d3f126bd38ef3d0171a6
parenta11ef8030aecfe80e4718b6000ea32d2bbc062a9 (diff)
remove doubles uses an operator property for the merge distance. it no longer reports number of merged verts to the user, as this violates operator nonmodality and messes up last operator panel workflow.
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c7
-rw-r--r--source/blender/editors/mesh/mesh_ops.c10
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h1
3 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 9c8e8e11e86..7698faf3178 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -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?
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index 3cdf1d47817..5be39a3e4f1 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -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);
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index d58488ce82d..54433fd4254 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -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;