This is a design doc to clarify how we should handle cases where operators aren't applicable.
Currently, we deal with this poorly:
- In the context menus, we often show properties that won't work (such as when nothing is selected)
- In regular menus, sometimes operators don't work in certain criteria, but it isn't communicated
Here's how I think we should solve it:
Rule: Only ever show operators here that actually work in the current context.
This means that, if nothing is selected, we should not show operators to act on the selection, since this will fail.
In general the context menus are always meant to show the user relevant items for the current situation, so this fits with that concept.
When nothing is selected
For the case where nothing is selected, there often won't be very many applicable operators. In that case, we should add operators to add new items (objects, meshes, strips etc).
These we should keep constant, and not hide or show items, since it breaks muscle memory. Instead, we should use greying out. Preferably we should improve operator polling so that operators get greyed out when not applicable. When nothing is selected, or the wrong kind of item is selected, operatoers that don't do anything then should become greyed out.