[Bf-committers] Regarding the current usage of proportional edit

Campbell Barton ideasman42 at gmail.com
Sat Jul 6 04:54:50 CEST 2013

On Sat, Jul 6, 2013 at 12:44 PM, David Jeske <davidj at gmail.com> wrote:
>> import bpy
>> km = bpy.context.window_manager.keyconfigs.default.keymaps["3D View"]
>> kmi = km.keymap_items.new("wm.context_cycle_enum", 'O', 'PRESS',
> oskey=True)
>> kmi.properties.data_path = "tool_settings.proportional_edit_falloff"
> When I do this, I get the same behavior as the current. It cycles through
> the options. I want it to pop-up the menu of all the proportional editing
> options, like it does for "delete" when a vertex is selected in edit mode.
> Did I do something wrong?

Ah, I misunderstood, in that case use "wm.context_menu_enum"

import bpy
km = bpy.context.window_manager.keyconfigs.default.keymaps["3D View"]
kmi = km.keymap_items.new("wm.context_menu_enum", 'O', 'PRESS', oskey=True)
kmi.properties.data_path = "tool_settings.proportional_edit_falloff"

>> It doesn't work because the rna path is used as an operator name.
> I admit I don't understand enough about RNA, Python, and keymaps to know
> what this means.
>  As a "naive user" in this situation, I would really like it if I could
> hover-over a control, look at the RNA/Python path, and type that directly
> into a keymap to trigger the menu. I don't understand why I can't do this.
> Heck, I'd like to be able to "right click" on the control and choose "make
> shortcut" and get a nice panel to set it up. Any advice on how I make that
> work?

At the moment you can't do that but of course it could be made to work.

- Campbell

More information about the Bf-committers mailing list