diff options
author | Campbell Barton <campbell@blender.org> | 2022-06-05 16:09:33 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-06-05 16:21:50 +0300 |
commit | 648350e456490f8d6258e7de9bf94d3a6a34dbb2 (patch) | |
tree | ebadc06ad8d97cfd98659084fa3277430b875f12 /source/blender/windowmanager/gizmo | |
parent | d450a791c37e4df0b37aab4feb8925fef206c4c8 (diff) |
UI: show gizmo while transforming
When interacting with translate/rotate/scale gizmo, show the gizmo while
it's in use. There are some exceptions to this, as showing all scale
gizmos while scaling causes the gizmos to become large & distracting so
in this case only the gizmo being dragged is shown.
Resolves T63743.
Diffstat (limited to 'source/blender/windowmanager/gizmo')
-rw-r--r-- | source/blender/windowmanager/gizmo/WM_gizmo_api.h | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_api.h b/source/blender/windowmanager/gizmo/WM_gizmo_api.h index 80d29bb8c40..663c8a0baed 100644 --- a/source/blender/windowmanager/gizmo/WM_gizmo_api.h +++ b/source/blender/windowmanager/gizmo/WM_gizmo_api.h @@ -388,6 +388,8 @@ void WM_gizmomap_message_subscribe(const struct bContext *C, struct ARegion *region, struct wmMsgBus *mbus); bool WM_gizmomap_is_any_selected(const struct wmGizmoMap *gzmap); +struct wmGizmo *WM_gizmomap_get_modal(const struct wmGizmoMap *gzmap); + /** * \note We could use a callback to define bounds, for now just use matrix location. */ diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c index f481f19045d..36faeab161f 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c @@ -229,6 +229,11 @@ bool WM_gizmomap_is_any_selected(const wmGizmoMap *gzmap) return gzmap->gzmap_context.select.len != 0; } +wmGizmo *WM_gizmomap_get_modal(const wmGizmoMap *gzmap) +{ + return gzmap->gzmap_context.modal; +} + bool WM_gizmomap_minmax(const wmGizmoMap *gzmap, bool UNUSED(use_hidden), bool use_select, |