From 05538a7c54408d59e7caf7b79b0ce8960f50a2a6 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 1 May 2011 07:39:21 +0000 Subject: [PATCH] Fix #27239: "A" menu in Sculptmode fails 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 | 2 +- source/blender/editors/sculpt_paint/paint_ops.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 6161aa4aa19..d02b2bfbdde 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -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) diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 3b4b828d0f6..577e9739537 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -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;