You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Essentially, commands are a user-facing concept for translating user interaction into graph update messages. They are states of interaction that can be entered, canceled (aborted), committed, or replaced with another ongoing command.
Rename from actions to commands
The current approach based on the message system uses the term "actions". This refactor will instead use the term "commands" to distinguish it from the current approach, and because that is the preferable terminology.
Separation from message system
Currently, the message system is (ab)used for actions, which imposes some limitations. The whole action is a write-only event that must be dispatched instantaneously with known parameters. We need more flexibility for dynamically updating the parameters (like Blender's bottom left command parameters menu that can adjust the values after a command was run). Commands also need to report their current validity and status based on state and configurations. So it needs to be able to determine if it's valid to be run in the current state, and can report itself as grayed out if not. It also needs to know its current keyboard shortcuts so it can report that. Also, it needs to know its canonical organization within the menu bar's menus to tell the user where to look. It should also present a tooltip for the command definition, shown anywhere it's presented. These changes will also make it easier to break up document editing into discrete command steps, enabling the repeating of an action (#1979), showing in the File > Undo/Redo menu listings a name of the command that will be undone/redone, or even a whole history panel showing each editing step that changed the document.
Quick access menus and custom hotkey bindings
Any command should be able to be bound to a keyboard shortcut (#1544) or quick favorites, just like in Blender, by right clicking on it from any menu. Commands need to be standardized enough for display in different locations that any menu can utilize the reusable concept, whether that's in the menu bar entries, command palette (#384), any right click context menu (#138), and many dropdown menus that display a list of commands similar to a context menu.
Breaking out tool behavior into commands
Currently, the tools perform the actual interaction states. The state machine for a tool dictates what behavior the tool is engaging in at that time. We'd like to instead move towards a model where the tools aren't engaging in the behavior themselves, but just managing the transitions between states which run the commands that perform the behavior. That way many tools can reuse the same behavior. A good example is the Tilt command, which in its current (action) form, exists in three places: (1) from any tool by holding Alt + MMB and moving the cursor, (2) with the Navigate tool by holding Alt + LMB and moving the cursor, or (3) clicking the View > Tilt menu command (action) and moving the cursor (without any key held down).
Combine with the hints system
This lets us avoid redundantly specifying both the presently available actions (which are currently valid hotkeys) and curated hints (which are drawn for the user). By combining them, it forces us to be comprehensive about our hint list. We still need to provide the human-curated list of hints where a name and grouping is provided to render neatly for human consumption, but the attached actions would thus become part of the hints instead of being a separate system. Pulling off this change requires that we increase the capabilities of the input mapper for specifying how mouse interaction works with keys, and avoiding our current way of telling some messages to check for the status of certain modifier keys in the handler (those which use refresh_keys in the input mapper). We need to make changes to the system in order to be able to accurately derive the mouse and keyboard icons from the input mapper entry.
The text was updated successfully, but these errors were encountered:
Essentially, commands are a user-facing concept for translating user interaction into graph update messages. They are states of interaction that can be entered, canceled (aborted), committed, or replaced with another ongoing command.
Rename from actions to commands
The current approach based on the message system uses the term "actions". This refactor will instead use the term "commands" to distinguish it from the current approach, and because that is the preferable terminology.
Separation from message system
Currently, the message system is (ab)used for actions, which imposes some limitations. The whole action is a write-only event that must be dispatched instantaneously with known parameters. We need more flexibility for dynamically updating the parameters (like Blender's bottom left command parameters menu that can adjust the values after a command was run). Commands also need to report their current validity and status based on state and configurations. So it needs to be able to determine if it's valid to be run in the current state, and can report itself as grayed out if not. It also needs to know its current keyboard shortcuts so it can report that. Also, it needs to know its canonical organization within the menu bar's menus to tell the user where to look. It should also present a tooltip for the command definition, shown anywhere it's presented. These changes will also make it easier to break up document editing into discrete command steps, enabling the repeating of an action (#1979), showing in the File > Undo/Redo menu listings a name of the command that will be undone/redone, or even a whole history panel showing each editing step that changed the document.
Quick access menus and custom hotkey bindings
Any command should be able to be bound to a keyboard shortcut (#1544) or quick favorites, just like in Blender, by right clicking on it from any menu. Commands need to be standardized enough for display in different locations that any menu can utilize the reusable concept, whether that's in the menu bar entries, command palette (#384), any right click context menu (#138), and many dropdown menus that display a list of commands similar to a context menu.
Breaking out tool behavior into commands
Currently, the tools perform the actual interaction states. The state machine for a tool dictates what behavior the tool is engaging in at that time. We'd like to instead move towards a model where the tools aren't engaging in the behavior themselves, but just managing the transitions between states which run the commands that perform the behavior. That way many tools can reuse the same behavior. A good example is the Tilt command, which in its current (action) form, exists in three places: (1) from any tool by holding Alt + MMB and moving the cursor, (2) with the Navigate tool by holding Alt + LMB and moving the cursor, or (3) clicking the View > Tilt menu command (action) and moving the cursor (without any key held down).
Combine with the hints system
This lets us avoid redundantly specifying both the presently available actions (which are currently valid hotkeys) and curated hints (which are drawn for the user). By combining them, it forces us to be comprehensive about our hint list. We still need to provide the human-curated list of hints where a name and grouping is provided to render neatly for human consumption, but the attached actions would thus become part of the hints instead of being a separate system. Pulling off this change requires that we increase the capabilities of the input mapper for specifying how mouse interaction works with keys, and avoiding our current way of telling some messages to check for the status of certain modifier keys in the handler (those which use
refresh_keys
in the input mapper). We need to make changes to the system in order to be able to accurately derive the mouse and keyboard icons from the input mapper entry.The text was updated successfully, but these errors were encountered: