diff options
author | Julian Eisel <julian@blender.org> | 2022-07-20 18:25:31 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-07-20 18:25:31 +0300 |
commit | 9dbcefb10e53cc809eb2e99333376b2a881c0863 (patch) | |
tree | 9ea058c2877c472aba82650e24e5927e3f03eded /source/blender/windowmanager/xr/intern/wm_xr_action.c | |
parent | e1ced645fa208b3b77e07c99cb289cf7fa659ad3 (diff) | |
parent | 85f0b2ef5d5bfb67c245da0a52aeec44e63445fa (diff) |
Merge branch 'asset-browser-grid-view' into file-browser-grid-view
Diffstat (limited to 'source/blender/windowmanager/xr/intern/wm_xr_action.c')
-rw-r--r-- | source/blender/windowmanager/xr/intern/wm_xr_action.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/windowmanager/xr/intern/wm_xr_action.c b/source/blender/windowmanager/xr/intern/wm_xr_action.c index 6750e7a7d77..a83415c98af 100644 --- a/source/blender/windowmanager/xr/intern/wm_xr_action.c +++ b/source/blender/windowmanager/xr/intern/wm_xr_action.c @@ -391,13 +391,20 @@ void WM_xr_action_binding_destroy(wmXrData *xr, xr->runtime->context, action_set_name, 1, &action_name, &profile_path); } -bool WM_xr_active_action_set_set(wmXrData *xr, const char *action_set_name) +bool WM_xr_active_action_set_set(wmXrData *xr, const char *action_set_name, bool delayed) { wmXrActionSet *action_set = action_set_find(xr, action_set_name); if (!action_set) { return false; } + if (delayed) { + /* Save name to activate action set later, before next actions sync + * (see #wm_xr_session_actions_update()). */ + strcpy(xr->runtime->session_state.active_action_set_next, action_set_name); + return true; + } + { /* Clear any active modal/haptic actions. */ wmXrActionSet *active_action_set = xr->runtime->session_state.active_action_set; |