diff options
author | Peter Kim <pk15950@gmail.com> | 2021-10-05 09:55:57 +0300 |
---|---|---|
committer | Peter Kim <pk15950@gmail.com> | 2021-10-05 10:05:12 +0300 |
commit | 08511b1c3de0338314940397083adaba4e9cf492 (patch) | |
tree | 879ddffecd08dd9315847fdcffb0b2d76cee8637 /source/blender/windowmanager/WM_types.h | |
parent | 300403a38b8ed7f0f84125ca9a82264757ae704a (diff) |
XR: Add runtime window area for XR events
This adds an offscreen View3D window area for the VR view in order to
execute XR events/operators in the proper context. The area is created
as runtime data before XR events are dispatched and set as the active
area during XR event handling.
Since the area is runtime-only, it will not be saved in files and since
the area is offscreen, it will not interfere with regular window areas.
The area is removed with the rest of the XR runtime data on exit, file
read, or when stopping the VR session.
Note: This also adds internal types (EVT_DATA_XR, EVT_XR_ACTION) and
structs (wmXrActionData) for XR events.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D12472
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 7f52bef3203..14a69d9c435 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -120,6 +120,7 @@ struct wmWindowManager; #include "BLI_compiler_attrs.h" #include "DNA_listBase.h" #include "DNA_vec_types.h" +#include "DNA_xr_types.h" #include "RNA_types.h" /* exported types for WM */ @@ -721,6 +722,36 @@ typedef struct wmXrActionState { }; int type; /* eXrActionType */ } wmXrActionState; + +typedef struct wmXrActionData { + /** Action set name. */ + char action_set[64]; + /** Action name. */ + char action[64]; + /** Type. */ + eXrActionType type; + /** State. Set appropriately based on type. */ + float state[2]; + /** State of the other subaction path for bimanual actions. */ + float state_other[2]; + + /** Input threshold for float/vector2f actions. */ + float float_threshold; + + /** Controller aim pose corresponding to the action's subaction path. */ + float controller_loc[3]; + float controller_rot[4]; + /** Controller aim pose of the other subaction path for bimanual actions. */ + float controller_loc_other[3]; + float controller_rot_other[4]; + + /** Operator. */ + struct wmOperatorType *ot; + struct IDProperty *op_properties; + + /** Whether bimanual interaction is occuring. */ + bool bimanual; +} wmXrActionData; #endif /** Timer flags. */ |