[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32418] trunk/blender: Fix #24215: Bad shorcut indication for Bezier curve handles.
Sergey Sharybin
g.ulairi at gmail.com
Mon Oct 11 20:53:11 CEST 2010
Revision: 32418
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32418
Author: nazgul
Date: 2010-10-11 20:53:11 +0200 (Mon, 11 Oct 2010)
Log Message:
-----------
Fix #24215: Bad shorcut indication for Bezier curve handles.
All existing handle type manipulation hotkeys replaced with unified V-menu
where you could directoly set type you need.
Modified Paths:
--------------
trunk/blender/release/scripts/ui/space_info.py
trunk/blender/source/blender/editors/curve/curve_ops.c
Modified: trunk/blender/release/scripts/ui/space_info.py
===================================================================
--- trunk/blender/release/scripts/ui/space_info.py 2010-10-11 18:47:28 UTC (rev 32417)
+++ trunk/blender/release/scripts/ui/space_info.py 2010-10-11 18:53:11 UTC (rev 32418)
@@ -219,7 +219,19 @@
layout.operator("surface.primitive_nurbs_surface_sphere_add", icon='SURFACE_NSPHERE', text="NURBS Sphere")
layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text="NURBS Torus")
+class INFO_MT_curve_handle_type_set(bpy.types.Menu):
+ bl_idname = "INFO_MT_curve_handle_type_set"
+ bl_label = "Handle Type"
+ def draw(self, context):
+ layout = self.layout
+ layout.operator_context = 'INVOKE_REGION_WIN'
+ layout.operator("curve.handle_type_set", text="Automatic").type = "AUTOMATIC"
+ layout.operator("curve.handle_type_set", text="Vector").type = "VECTOR"
+ layout.operator("curve.handle_type_set", text="Align").type = "ALIGN"
+ layout.operator("curve.handle_type_set", text="Free Align").type = "FREE_ALIGN"
+
+
class INFO_MT_armature_add(bpy.types.Menu):
bl_idname = "INFO_MT_armature_add"
bl_label = "Armature"
Modified: trunk/blender/source/blender/editors/curve/curve_ops.c
===================================================================
--- trunk/blender/source/blender/editors/curve/curve_ops.c 2010-10-11 18:47:28 UTC (rev 32417)
+++ trunk/blender/source/blender/editors/curve/curve_ops.c 2010-10-11 18:53:11 UTC (rev 32418)
@@ -194,6 +194,7 @@
keymap->poll= ED_operator_editsurfcurve;
WM_keymap_add_menu(keymap, "INFO_MT_edit_curve_add", AKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_menu(keymap, "INFO_MT_curve_handle_type_set", VKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "CURVE_OT_vertex_add", LEFTMOUSE, KM_CLICK, KM_CTRL, 0);
WM_keymap_add_item(keymap, "CURVE_OT_select_all", AKEY, KM_PRESS, 0, 0);
@@ -214,9 +215,6 @@
WM_keymap_add_item(keymap, "CURVE_OT_tilt_clear", TKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TRANSFORM_OT_tilt", TKEY, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", TFM_CURVE_SHRINKFATTEN);
- RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", 1);
- RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", HKEY, KM_PRESS, 0, 0)->ptr, "type", 3);
- RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", VKEY, KM_PRESS, 0, 0)->ptr, "type", 2);
WM_keymap_add_item(keymap, "CURVE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
More information about the Bf-blender-cvs
mailing list