diff options
author | Matt Ebb <matt@mke3.net> | 2010-03-29 11:07:20 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-03-29 11:07:20 +0400 |
commit | 86b30beb45fbdfd74bc7cef38a6098a2205b954d (patch) | |
tree | 78cc774646768ae5225851496ad6bfdfb99d3800 /source/blender | |
parent | bd7ed4f077d3ff86c1043642b5d228a95d9334a6 (diff) |
Fix [#21542] Clear origin shortkey Alt+O in object mode doesn't work
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/curve/curve_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_ops.c | 17 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 2 |
4 files changed, 13 insertions, 10 deletions
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c index 18652bf3716..a72b7f68dab 100644 --- a/source/blender/editors/curve/curve_ops.c +++ b/source/blender/editors/curve/curve_ops.c @@ -216,6 +216,6 @@ void ED_keymap_curve(wmKeyConfig *keyconf) /* menus */ WM_keymap_add_menu(keymap, "VIEW3D_MT_hook", HKEY, KM_PRESS, KM_CTRL, 0); - ED_object_generic_keymap(keyconf, keymap, TRUE); + ED_object_generic_keymap(keyconf, keymap, 2); } diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index 5b187b10b7d..5351a2b5a2d 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -309,6 +309,6 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "VIEW3D_MT_uv_map", UKEY, KM_PRESS, 0, 0); WM_keymap_add_menu(keymap, "VIEW3D_MT_vertex_group", GKEY, KM_PRESS, KM_CTRL, 0); - ED_object_generic_keymap(keyconf, keymap, TRUE); + ED_object_generic_keymap(keyconf, keymap, 2); } diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 8ec33f676ca..2ff99bac1c5 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -274,7 +274,7 @@ void ED_keymap_object(wmKeyConfig *keyconf) keymap->poll= object_mode_poll; /* object mode supports PET now */ - ED_object_generic_keymap(keyconf, keymap, TRUE); + ED_object_generic_keymap(keyconf, keymap, 1); WM_keymap_add_item(keymap, "VIEW3D_OT_game_start", PKEY, KM_PRESS, 0, 0); @@ -362,7 +362,7 @@ void ED_keymap_object(wmKeyConfig *keyconf) /* menus */ WM_keymap_add_menu(keymap, "VIEW3D_MT_hook", HKEY, KM_PRESS, KM_CTRL, 0); - ED_object_generic_keymap(keyconf, keymap, TRUE); + ED_object_generic_keymap(keyconf, keymap, 1); } void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int do_pet) @@ -370,7 +370,7 @@ void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keym wmKeyMapItem *kmi; /* used by mesh, curve & lattice only */ - if(do_pet) { + if(do_pet > 0) { /* context ops */ kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_enum", OKEY, KM_PRESS, KM_SHIFT, 0); RNA_string_set(kmi->ptr, "path", "tool_settings.proportional_editing_falloff"); @@ -380,10 +380,13 @@ void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keym RNA_string_set(kmi->ptr, "value_1", "DISABLED"); RNA_string_set(kmi->ptr, "value_2", "ENABLED"); - kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, KM_ALT, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.proportional_editing"); - RNA_string_set(kmi->ptr, "value_1", "DISABLED"); - RNA_string_set(kmi->ptr, "value_2", "CONNECTED"); + /* for modes/object types that allow 'conencted' mode, add the Alt O key */ + if (do_pet > 1) { + kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, KM_ALT, 0); + RNA_string_set(kmi->ptr, "path", "tool_settings.proportional_editing"); + RNA_string_set(kmi->ptr, "value_1", "DISABLED"); + RNA_string_set(kmi->ptr, "value_2", "CONNECTED"); + } } } diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index fe0478a2a15..3cfbac07e49 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -3243,7 +3243,7 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf) /* menus */ WM_keymap_add_menu(keymap, "IMAGE_MT_uvs_snap", SKEY, KM_PRESS, KM_SHIFT, 0); - ED_object_generic_keymap(keyconf, keymap, TRUE); + ED_object_generic_keymap(keyconf, keymap, 1); transform_keymap_for_space(keyconf, keymap, SPACE_IMAGE); } |