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:
authorAntony Riakiotakis <kalast@gmail.com>2012-05-16 18:30:41 +0400
committerAntony Riakiotakis <kalast@gmail.com>2012-05-16 18:30:41 +0400
commit5ff7ede1b5e50fd1c521dbf17760117c67be885e (patch)
tree6931ef43554d61d967a28ea2ab1fc68295a230a9 /source/blender/editors/mesh/mesh_ops.c
parent2e89e0096a5520e3fa042eb748958507d251c77a (diff)
modal operation for bevel and inset:
This commit adds some first building blocks for the two operators to work modally based on mouse input. To make their function easier, two hotkeys are introduced, Ctrl+B for bevel and I for inset. TODO: After discussion with Campbell, we would like to add scale-style line indicators for the operators. This is already done for transform operators but a new interface for mesh operations may have to be written using pieces from that code since, strictly speaking bevel and inset are not exactly "transform" operators. Also, a better input method for inset is needed and more options exposed. The method implemented right now uses mouse move for thickness and ctrl-mouse move for depth. These are calculated using the distance of the selection center in screen space and the mouse position. While that may work and prevents abrupt changes in values when switching from thickness tweak mode to depth tweak mode, it limits the magnitude of values that can be put into the tool especially in small or large scale. Alternatives until a better method is written include: * use relative offset (works but may give strange results) * tweak manually after the operation.
Diffstat (limited to 'source/blender/editors/mesh/mesh_ops.c')
-rw-r--r--source/blender/editors/mesh/mesh_ops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index 98dce10779f..a77a6f4b430 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -255,6 +255,8 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
keymap->poll = ED_operator_editmesh;
WM_keymap_add_item(keymap, "MESH_OT_loopcut_slide", RKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_bevel", BKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_inset", IKEY, KM_PRESS, 0, 0);
/* selecting */
/* standard mouse selection goes via space_view3d */