Blender Git Loki

Git Commits -> Revision 3434a99

Revision 3434a99 by Peter Kim (master)
October 26, 2021, 04:34 (GMT)
XR Controller Support Step 5: Navigation

Adds navigation transforms (pose, scale) to the XR session state that
will be applied to the viewer/controller poses. By manipulating these
values, a viewer can move through the VR viewport without the need to
physically walk through it.

Add-ons can access these transforms via Python
(XrSessionState.navigation_location/rotation/scale) to use with custom

Also adds 3 new VR navigation operators that will be exposed to users
as default actions in the VR Scene Inspection add-on. While all three
of these operators have custom properties that can greatly influence
their behaviors, for now these properties will not be accessible by
users from the UI. However, other add-ons can still set these custom
properties if they desire.

1). Raycast-based teleport
Moves the user to a location pointed at on a mesh object. The result
can optionally be constrained to specific axes, for example to achieve
"elevation snapping" behavior by constraining to the Z-axis. In
addition, one can specify an interpolation factor and offset.

Credit to KISKA for the elevation snapping concept.

2). "Grab" navigation
Moves the user through the viewport by pressing inputs on one or two
held controllers and applying deltas to the navigation matrix based on
the displacement of these controllers. When inputs on both controllers
are pressed at the same time (bimanual interaction), the user can scale
themselves relative to the scene based on the distance between the

Also supports locks for location, rotation, and scale.

3). Fly navigation
Navigates the viewport by pressing a button and moving/turning relative to
navigation space or the VR viewer or controller. Via the operator's
properties, one can select from a variety of these modes as well as
specify the min/max speed and whether to lock elevation.

Reviewed By: Severin

Differential Revision:

Commit Details:

Full Hash: 3434a991ec5befef19c5484bfc70a3a333e42c34
Parent Commit: e463d2c
Lines Changed: +1867, -130

1 Added Path:

/source/blender/windowmanager/xr/intern/wm_xr_operators.c (+1537, -0) (View)

11 Modified Paths:

/source/blender/editors/include/ED_transform_snap_object_context.h (+1, -0) (Diff)
/source/blender/editors/transform/transform_snap_object.c (+5, -0) (Diff)
/source/blender/makesdna/DNA_xr_types.h (+2, -2) (Diff)
/source/blender/makesrna/intern/rna_xr.c (+98, -0) (Diff)
/source/blender/windowmanager/CMakeLists.txt (+1, -0) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+4, -84) (Diff)
/source/blender/windowmanager/WM_api.h (+7, -0) (Diff)
/source/blender/windowmanager/xr/intern/wm_xr_draw.c (+38, -9) (Diff)
/source/blender/windowmanager/xr/intern/wm_xr_intern.h (+21, -1) (Diff)
/source/blender/windowmanager/xr/intern/wm_xr_session.c (+150, -34) (Diff)
/source/blender/windowmanager/xr/wm_xr.h (+3, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021