forked from bartvdbraak/blender
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.
This commit is contained in:
parent
22c2aef77c
commit
05538a7c54
@ -395,7 +395,7 @@ class WM_MT_context_menu_enum(bpy.types.Menu):
|
|||||||
base_path, prop_string = data_path.rsplit(".", 1)
|
base_path, prop_string = data_path.rsplit(".", 1)
|
||||||
value_base = context_path_validate(context, base_path)
|
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:
|
for name, identifier in values:
|
||||||
prop = self.layout.operator("wm.context_set_enum", text=name)
|
prop = self.layout.operator("wm.context_set_enum", text=name)
|
||||||
|
@ -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);
|
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");
|
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 */
|
/* Vertex Paint mode */
|
||||||
keymap= WM_keymap_find(keyconf, "Vertex Paint", 0, 0);
|
keymap= WM_keymap_find(keyconf, "Vertex Paint", 0, 0);
|
||||||
keymap->poll= vertex_paint_mode_poll;
|
keymap->poll= vertex_paint_mode_poll;
|
||||||
|
Loading…
Reference in New Issue
Block a user