3D View: Refactor navigation operators #106279

Merged
Germano Cavalcante merged 1 commits from mano-wii/blender:navigation_refactor into main 2023-04-28 14:11:06 +02:00

1 Commits

Author SHA1 Message Date
Germano Cavalcante cc9f011629 3D View: Refactor navigation operators
No functional changes.

Merge the modal callbacks of the `VIEW3D_OT_move`, `VIEW3D_OT_rotate` and `VIEW3D_OT_zoom` operators into a single simplified `view3d_navigate_modal_fn` callback.

Deduplicates initialization, finalization and `event_code` code.

Improved support for operation switching by existing (but unmapped) modal keymap items `VIEWROT_MODAL_SWITCH_ZOOM`, `VIEWROT_MODAL_SWITCH_MOVE` and `VIEWROT_MODAL_SWITCH_ROTATE`.
2023-04-27 22:19:45 -03:00