diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-12-15 22:25:41 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-12-15 22:47:54 +0300 |
commit | b32f5a922f05989ff129c3d266ebbed14b751e2a (patch) | |
tree | d335d69ab43480ea0e2f378112e7e3550cad5e78 /intern/cycles/blender | |
parent | 11be151d58ec0ca955f019b0eed738e3245110b8 (diff) |
Fix T93995: Cycles camera motion blur not working in right stereo view
Thanks to Michael (michael64) for identifying the solution.
Ref D13567
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/session.cpp | 7 | ||||
-rw-r--r-- | intern/cycles/blender/sync.cpp | 5 | ||||
-rw-r--r-- | intern/cycles/blender/sync.h | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/intern/cycles/blender/session.cpp b/intern/cycles/blender/session.cpp index b8165186b4f..b6f72707fe0 100644 --- a/intern/cycles/blender/session.cpp +++ b/intern/cycles/blender/session.cpp @@ -396,6 +396,13 @@ void BlenderSession::render(BL::Depsgraph &b_depsgraph_) /* set the current view */ b_engine.active_view_set(b_rview_name.c_str()); + /* Force update in this case, since the camera transform on each frame changes + * in different views. This could be optimized by somehow storing the animated + * camera transforms separate from the fixed stereo transform. */ + if ((scene->need_motion() != Scene::MOTION_NONE) && view_index > 0) { + sync->tag_update(); + } + /* update scene */ BL::Object b_camera_override(b_engine.camera_override()); sync->sync_camera(b_render, b_camera_override, width, height, b_rview_name.c_str()); diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp index 949b7cb1b3b..56137374d8e 100644 --- a/intern/cycles/blender/sync.cpp +++ b/intern/cycles/blender/sync.cpp @@ -95,6 +95,11 @@ void BlenderSync::reset(BL::BlendData &b_data, BL::Scene &b_scene) this->b_scene = b_scene; } +void BlenderSync::tag_update() +{ + has_updates_ = true; +} + /* Sync */ void BlenderSync::sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d) diff --git a/intern/cycles/blender/sync.h b/intern/cycles/blender/sync.h index 98197564bec..2db4125ba1c 100644 --- a/intern/cycles/blender/sync.h +++ b/intern/cycles/blender/sync.h @@ -66,6 +66,8 @@ class BlenderSync { void reset(BL::BlendData &b_data, BL::Scene &b_scene); + void tag_update(); + /* sync */ void sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d); void sync_data(BL::RenderSettings &b_render, @@ -267,7 +269,6 @@ class BlenderSync { Progress &progress; - protected: /* Indicates that `sync_recalc()` detected changes in the scene. * If this flag is false then the data is considered to be up-to-date and will not be * synchronized at all. */ |