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:
authorHans Goudey <h.goudey@me.com>2020-09-01 20:35:14 +0300
committerHans Goudey <h.goudey@me.com>2020-09-01 20:38:05 +0300
commitbaca8611e5fe4b3dcd6f5065fb125bc0a9d65934 (patch)
treebb1230387cd53b15f9621f10c4d0e5e2050b5580 /source/blender/windowmanager/xr/intern/wm_xr_session.c
parent31705201dddebf7e3be5c4533b89f380aad1ede1 (diff)
parent2930d4fcea405985f2212c5f28c061af7c4849f8 (diff)
Merge branch 'master' into active-fcurve-keyframeactive-fcurve-keyframe
Diffstat (limited to 'source/blender/windowmanager/xr/intern/wm_xr_session.c')
-rw-r--r--source/blender/windowmanager/xr/intern/wm_xr_session.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/windowmanager/xr/intern/wm_xr_session.c b/source/blender/windowmanager/xr/intern/wm_xr_session.c
index f3ce7be993f..b9ef40e3398 100644
--- a/source/blender/windowmanager/xr/intern/wm_xr_session.c
+++ b/source/blender/windowmanager/xr/intern/wm_xr_session.c
@@ -195,7 +195,7 @@ static void wm_xr_session_scene_and_evaluated_depsgraph_get(Main *bmain,
Scene *scene = WM_window_get_active_scene(root_win);
ViewLayer *view_layer = WM_window_get_active_view_layer(root_win);
- Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, false);
+ Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer);
BLI_assert(scene && view_layer && depsgraph);
BKE_scene_graph_evaluated_ensure(depsgraph, bmain);
*r_scene = scene;
@@ -250,9 +250,14 @@ void wm_xr_session_draw_data_update(const wmXrSessionState *state,
switch (event) {
case SESSION_STATE_EVENT_START:
- /* We want to start the session exactly at landmark position.
- * Run-times may have a non-[0,0,0] starting position that we have to subtract for that. */
- copy_v3_v3(draw_data->eye_position_ofs, draw_view->local_pose.position);
+ if (use_position_tracking) {
+ /* We want to start the session exactly at landmark position.
+ * Run-times may have a non-[0,0,0] starting position that we have to subtract for that. */
+ copy_v3_v3(draw_data->eye_position_ofs, draw_view->local_pose.position);
+ }
+ else {
+ copy_v3_fl(draw_data->eye_position_ofs, 0.0f);
+ }
break;
/* This should be triggered by the VR add-on if a landmark changes. */
case SESSION_STATE_EVENT_RESET_TO_BASE_POSE: