[Bf-blender-cvs] [c9c052aae03] xr-actions-D9124: Merge branch 'master' into xr-actions-D9124
Peter Kim
noreply at git.blender.org
Sun Mar 21 12:39:31 CET 2021
Commit: c9c052aae03f2303044db05c9a244c841a574b68
Author: Peter Kim
Date: Sun Mar 21 20:37:56 2021 +0900
Branches: xr-actions-D9124
https://developer.blender.org/rBc9c052aae03f2303044db05c9a244c841a574b68
Merge branch 'master' into xr-actions-D9124
===================================================================
===================================================================
diff --cc release/scripts/addons
index b3c76837b9a,6dfba915743..e4e19a37d5f
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit b3c76837b9ab55e83d6efbae7e2c8d55c0f17843
-Subproject commit 6dfba915743b67aff99ddcc19c0807d339a87c96
++Subproject commit e4e19a37d5f2c09cd25780c1b9e44b937771e18f
diff --cc source/blender/windowmanager/intern/wm_event_system.c
index a7b7593e7b1,ed1b53e8e20..197b59b8c99
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@@ -2105,9 -2060,10 +2077,10 @@@ static int wm_handler_operator_call(bCo
* nothing to do in this case.
*/
}
- else if (ot->modal) {
+ else if (ot->modal || ot->modal_3d) {
/* We set context to where modal handler came from. */
wmWindowManager *wm = CTX_wm_manager(C);
+ wmWindow *win = CTX_wm_window(C);
ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
@@@ -2122,21 -2078,17 +2095,25 @@@
}
/* Warning, after this call all context data and 'event' may be freed. see check below. */
- retval = ot->modal(C, op, event);
+ if (ot->modal_3d && event->type == EVT_XR_ACTION) {
+ retval = ot->modal_3d(C, op, event);
+ }
+ else if (ot->modal) {
+ retval = ot->modal(C, op, event);
+ }
+ else {
+ /* Pass through. An "XR operator" (only modal_3d) received a non-XR event.*/
+ }
OPERATOR_RETVAL_CHECK(retval);
- /* When this is _not_ the case the modal modifier may have loaded
- * a new blend file (demo mode does this), so we have to assume
- * the event, operator etc have all been freed. - campbell */
- if (CTX_wm_manager(C) == wm) {
+ if (ot->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm) {
+ wm->op_undo_depth--;
+ }
+
+ /* When the window changes the the modal modifier may have loaded a new blend file
+ * (the `system_demo_mode` add-on does this), so we have to assume the event,
+ * operator, area, region etc have all been freed. */
+ if ((CTX_wm_window(C) == win)) {
wm_event_modalkeymap_end(event, &event_backup);
More information about the Bf-blender-cvs
mailing list