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-08-06 13:56:14 +0400
committerJoseph Eagar <joeedh@gmail.com>2009-08-06 13:56:14 +0400
commit38de6d14e4e7a55a4109313942df3ae9211b1aeb (patch)
tree83288d248bc7a4794b8b34e607f3e319e905b381 /source/blender/editors/mesh
parent416a3bf4a14a951642cace5ee8033c4c20dd9f66 (diff)
parent1e4fb484001994f4e164aab7b44c9578df59f67d (diff)
merge with 2.5 (not trunk, last merge message said that on accident) at r22252
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/bmesh_tools.c14
-rw-r--r--source/blender/editors/mesh/editmesh.c2
-rw-r--r--source/blender/editors/mesh/editmesh_add.c4
-rw-r--r--source/blender/editors/mesh/editmesh_loop.c2
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c2
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c16
-rw-r--r--source/blender/editors/mesh/mesh_ops.c20
-rw-r--r--source/blender/editors/mesh/meshtools.c2
8 files changed, 33 insertions, 29 deletions
diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c
index 4576280a38d..269c9a4e972 100644
--- a/source/blender/editors/mesh/bmesh_tools.c
+++ b/source/blender/editors/mesh/bmesh_tools.c
@@ -1396,17 +1396,9 @@ static int mesh_duplicate_exec(bContext *C, wmOperator *op)
static int mesh_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- int ret;
-
WM_cursor_wait(1);
- ret = mesh_duplicate_exec(C, op);
+ mesh_duplicate_exec(C, op);
WM_cursor_wait(0);
-
- if (ret == OPERATOR_CANCELLED)
- return OPERATOR_CANCELLED;
-
- RNA_int_set(op->ptr, "mode", TFM_TRANSLATION);
- WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr);
return OPERATOR_FINISHED;
}
@@ -1514,9 +1506,7 @@ static int edge_rotate_selected(bContext *C, wmOperator *op)
EDBM_InitOpf(em, &bmop, op, "edgerotate edges=%e ccw=%d", eed, ccw);
BMO_Exec_Op(em->bm, &bmop);
- BMO_ITER(eed, &siter, em->bm, &bmop, "edgeout", BM_EDGE) {
- BM_Select(em->bm, eed, 1);
- }
+ BMO_HeaderFlag_Slot(em->bm, &bmop, "edgeout", BM_SELECT);
if (!EDBM_FinishOp(em, &bmop, op, 1))
return OPERATOR_CANCELLED;
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index 49872eae897..5892af0060b 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -1106,7 +1106,7 @@ void load_editMesh(Scene *scene, Object *ob, EditMesh *em)
if(pid.type == PTCACHE_TYPE_CLOTH)
cloth_write_cache(ob, pid.data, pid.cache->editframe);
else if(pid.type == PTCACHE_TYPE_SOFTBODY)
- sbWriteCache(ob, pid.cache->editframe);
+ softbody_write_cache(ob, pid.data, pid.cache->editframe);
}
/* the edges */
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index 806ef4c299e..ff0814661eb 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -1180,9 +1180,9 @@ static float new_primitive_matrix(bContext *C, float primmat[][4])
Mat4One(primmat);
- if(rv3d)
+ if(rv3d && (U.flag & USER_ADD_VIEWALIGNED)) {
Mat3CpyMat4(vmat, rv3d->viewmat);
- else
+ } else
Mat3One(vmat);
/* inverse transform for view and object */
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c
index a2ba040adc8..b59c46a8068 100644
--- a/source/blender/editors/mesh/editmesh_loop.c
+++ b/source/blender/editors/mesh/editmesh_loop.c
@@ -888,7 +888,7 @@ void MESH_OT_knife_cut(wmOperatorType *ot)
ot->modal= WM_gesture_lines_modal;
ot->exec= knife_cut_exec;
- ot->poll= ED_operator_editmesh;
+ ot->poll= EM_view3d_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index 0ade6ff8844..97c72dc49ca 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -93,7 +93,7 @@ editmesh_mods.c, UI level access, no geometry changes
#include "BLO_sys_types.h" // for intptr_t support
/* XXX */
-static void waitcursor() {}
+static void waitcursor(int val) {}
static int pupmenu() {return 0;}
/* ****************************** MIRROR **************** */
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index dea78545fac..c1497ce1a06 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -97,7 +97,7 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise
/* XXX */
static int extern_qread() {return 0;}
-static void waitcursor() {}
+static void waitcursor(int val) {}
static int pupmenu() {return 0;}
static int qtest() {return 0;}
#define add_numbut(a, b, c, d, e, f, g) {}
@@ -713,7 +713,7 @@ static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *event)
Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
- int constraint_axis[3] = {0, 0, 1};
+// int constraint_axis[3] = {0, 0, 1};
extrude_mesh(scene, obedit, em, op);
@@ -726,11 +726,11 @@ static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *event)
RNA_boolean_set(op->ptr, "mirror", 0);
/* the following two should only be set when extruding faces */
- RNA_enum_set(op->ptr, "constraint_orientation", V3D_MANIP_NORMAL);
- RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis);
+// RNA_enum_set(op->ptr, "constraint_orientation", V3D_MANIP_NORMAL);
+// RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis);
- WM_operator_name_call(C, "TFM_OT_translate", WM_OP_INVOKE_REGION_WIN, op->ptr);
+// WM_operator_name_call(C, "TFM_OT_translate", WM_OP_INVOKE_REGION_WIN, op->ptr);
return OPERATOR_FINISHED;
}
@@ -4701,9 +4701,9 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
BKE_mesh_end_editmesh(obedit->data, em);
- RNA_enum_set(op->ptr, "proportional", 0);
- RNA_boolean_set(op->ptr, "mirror", 0);
- WM_operator_name_call(C, "TFM_OT_translate", WM_OP_INVOKE_REGION_WIN, op->ptr);
+// RNA_enum_set(op->ptr, "proportional", 0);
+// RNA_boolean_set(op->ptr, "mirror", 0);
+// WM_operator_name_call(C, "TFM_OT_translate", WM_OP_INVOKE_REGION_WIN, op->ptr);
#endif
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index ebdef22349b..f3a504bb214 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -230,6 +230,8 @@ static void MESH_OT_specials(wmOperatorType *ot)
void ED_operatortypes_mesh(void)
{
+ wmOperatorType *ot;
+
WM_operatortype_append(MESH_OT_select_all_toggle);
WM_operatortype_append(MESH_OT_select_more);
WM_operatortype_append(MESH_OT_select_less);
@@ -313,9 +315,21 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_edge_specials);
WM_operatortype_append(MESH_OT_face_specials);
WM_operatortype_append(MESH_OT_specials);
-
WM_operatortype_append(MESH_OT_vert_connect);
WM_operatortype_append(MESH_OT_edge_split);
+
+ /* macros */
+ ot= WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ WM_operatortype_macro_define(ot, "MESH_OT_duplicate");
+ WM_operatortype_macro_define(ot, "TFM_OT_translate");
+
+ ot= WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", OPTYPE_UNDO|OPTYPE_REGISTER);
+ WM_operatortype_macro_define(ot, "MESH_OT_rip");
+ WM_operatortype_macro_define(ot, "TFM_OT_translate");
+
+ /*ot= WM_operatortype_append_macro("MESH_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER);
+ WM_operatortype_macro_define(ot, "MESH_OT_extrude");
+ WM_operatortype_macro_define(ot, "TFM_OT_translate");*/
}
/* note mesh keymap also for other space? */
@@ -395,12 +409,12 @@ void ED_keymap_mesh(wmWindowManager *wm)
WM_keymap_add_item(keymap, "MESH_OT_colors_rotate",EIGHTKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "MESH_OT_colors_mirror",EIGHTKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "MESH_OT_rip",VKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_rip_move",VKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "MESH_OT_merge", MKEY, KM_PRESS, KM_ALT, 0);
/* add/remove */
WM_keymap_add_item(keymap, "MESH_OT_edge_face_add", FKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "MESH_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_mesh_add", AKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "MESH_OT_separate", PKEY, KM_PRESS, KM_SHIFT, 0);
/* use KM_RELEASE because same key is used for tweaks */
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 5f406cb4db8..49e721f34e8 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -97,7 +97,7 @@
#include "mesh_intern.h"
/* XXX */
-static void waitcursor() {}
+static void waitcursor(int val) {}
static void error() {}
static int pupmenu() {return 0;}
/* XXX */