Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-06-05 16:09:33 +0300
committerCampbell Barton <campbell@blender.org>2022-06-05 16:21:50 +0300
commit648350e456490f8d6258e7de9bf94d3a6a34dbb2 (patch)
treeebadc06ad8d97cfd98659084fa3277430b875f12 /source/blender/windowmanager/intern
parentd450a791c37e4df0b37aab4feb8925fef206c4c8 (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/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 3ff3117dafe..b28ae16c5a1 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -4583,6 +4583,20 @@ void WM_event_remove_area_handler(ListBase *handlers, void *area)
}
}
+wmOperator *WM_operator_find_modal_by_type(wmWindow *win, const wmOperatorType *ot)
+{
+ LISTBASE_FOREACH (wmEventHandler *, handler_base, &win->modalhandlers) {
+ if (handler_base->type != WM_HANDLER_TYPE_OP) {
+ continue;
+ }
+ wmEventHandler_Op *handler = (wmEventHandler_Op *)handler_base;
+ if (handler->op && handler->op->type == ot) {
+ return handler->op;
+ }
+ }
+ return NULL;
+}
+
#if 0
static void WM_event_remove_handler(ListBase *handlers, wmEventHandler *handler)
{