Fix #27239: "A" menu in Sculptmode fails
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 1 May 2011 07:39:21 +0000 (07:39 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sun, 1 May 2011 07:39:21 +0000 (07:39 +0000)
Simple incorrect property accessing fix (enum_items vs. items).

Additional change: removed hotkey to toggle airbrush in sculpt mode
TODO: incorrect hotkeys are shown in stroke method menu, but it's how
      hotkey string detecting works now.

release/scripts/startup/bl_operators/wm.py
source/blender/editors/sculpt_paint/paint_ops.c

index 6161aa4aa1959454da6b3fb0b58cabe35edf686c..d02b2bfbdde1aee001f5e9611b8bf69d9a5e5ff0 100644 (file)
@@ -395,7 +395,7 @@ class WM_MT_context_menu_enum(bpy.types.Menu):
         base_path, prop_string = data_path.rsplit(".", 1)
         value_base = context_path_validate(context, base_path)
 
-        values = [(i.name, i.identifier) for i in value_base.bl_rna.properties[prop_string].items]
+        values = [(i.name, i.identifier) for i in value_base.bl_rna.properties[prop_string].enum_items]
 
         for name, identifier in values:
             prop = self.layout.operator("wm.context_set_enum", text=name)
index 3b4b828d0f66f71cbaccc3f0ab1e29d324018612..577e9739537075d6f2bccb9de35081ac7526d67b 100644 (file)
@@ -517,9 +517,6 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
        kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", RKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.brush.use_rake");
 
-       kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", AKEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.brush.use_airbrush");
-
        /* Vertex Paint mode */
        keymap= WM_keymap_find(keyconf, "Vertex Paint", 0, 0);
        keymap->poll= vertex_paint_mode_poll;