Expose the actual clicked UI label, not just the generic operator name
Blender already knows the exact label the user clicked. You can see that in the context menu and Quick Favorites.
The problem is that this UI-facing label is not generally reusable outside that built-in path.
Ideally, something like
bpy.context.button.display_name
, or perhaps
bpy.context.button_operator.display_name
, would be enough: a read-only Python value for the actual label the clicked button was displaying in the UI.
0 Comments