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:
authorBrecht Van Lommel <brecht@blender.org>2021-12-15 22:25:41 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-01-11 17:52:18 +0300
commit1c04d22ebf803d19bd9174a3a57249513fbe7093 (patch)
treea6e9db81a69f5585bae65b435421a5d3c7c27367
parent66346a6852e282a3a614ac230badf3aa3d228fc4 (diff)
Fix T93995: Cycles camera motion blur not working in right stereo view
Thanks to Michael (michael64) for identifying the solution. Ref D13567
-rw-r--r--intern/cycles/blender/blender_session.cpp7
-rw-r--r--intern/cycles/blender/blender_sync.cpp5
-rw-r--r--intern/cycles/blender/blender_sync.h3
3 files changed, 14 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index 89854f6a0e5..6293718a988 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -524,6 +524,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/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index 3e8a7f8bb53..c2aa4703a6f 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -92,6 +92,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/blender_sync.h b/intern/cycles/blender/blender_sync.h
index 15a10f2b46b..55c2904ddf9 100644
--- a/intern/cycles/blender/blender_sync.h
+++ b/intern/cycles/blender/blender_sync.h
@@ -64,6 +64,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,
@@ -265,7 +267,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. */