Make F2 contextually rename based on what the mouse is hovering over
A lot of Blender's UI follows a convention of having an operation act on the element / region the mouse is currently over, ie. Copy/Pasting values. This gets one in the mindset that this works for everything else, in this case renaming. I often find myself hovering over a workspace tab, a material, vertex group, UV Map, etc. and pressing F2 expecting it to rename that object / datablock instead of (mostly) renaming the active object. I know most of these operations can be completed with a double click, but pressing F2 also feels natural.
This would make most sense in cases where the mouse focus is in an area where there isn't a definitive active object, ie. pressing F2 while hovering over the material parameter editor would just rename the active material, instead of renaming the active object as it does now.
3 Comments
basically how it should work
For objects you can make macro operator which will do select
bpy.ops.view3d.select()and then call rename panelbpy.ops.wm.call_panel(name='TOPBAR_PT_name', keep_open=False). By yourself (few rows of basic python code) or with help of PME addon, then just replace defaultF2keymap by your one.For datablocks, materials, etc. is hold
Ctrland click/double click not enough?* @IIIFGIII * I don't want to rename hoverred over objects, that's not quite natural, but in the UI there are places where you can just hover over an input and affect it without needing to click it. Double clicking is of course available, but the hover over and F2 feels so natural that it's actually jarring when it doesn't happen.