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:
authorPhil Gosch <phil@saphirestudio.at>2017-09-29 23:52:29 +0300
committerPhil Gosch <phil@saphirestudio.at>2017-09-29 23:52:29 +0300
commit2b1ec9c18fadf6b5cd71a7d4122776f5d4b8ac33 (patch)
tree01b477f0ea027ab5908f332f6102db6a1d381b76 /intern/cycles/blender/blender_camera.cpp
parent5cdd4388ffaad5ade916dba3c18e2bc679e19747 (diff)
parente3546a5097b1b30a3c694ce0f6b98c2f7e70510c (diff)
Merge remote-tracking branch 'origin/master' into soc-2016-uv_toolssoc-2016-uv_tools
Diffstat (limited to 'intern/cycles/blender/blender_camera.cpp')
-rw-r--r--intern/cycles/blender/blender_camera.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_camera.cpp b/intern/cycles/blender/blender_camera.cpp
index 40d6b25f2b7..b29711d30d3 100644
--- a/intern/cycles/blender/blender_camera.cpp
+++ b/intern/cycles/blender/blender_camera.cpp
@@ -544,7 +544,11 @@ void BlenderSync::sync_camera_motion(BL::RenderSettings& b_render,
if(tfm != cam->matrix) {
VLOG(1) << "Camera " << b_ob.name() << " motion detected.";
- if(motion_time == -1.0f) {
+ if(motion_time == 0.0f) {
+ /* When motion blur is not centered in frame, cam->matrix gets reset. */
+ cam->matrix = tfm;
+ }
+ else if(motion_time == -1.0f) {
cam->motion.pre = tfm;
cam->use_motion = true;
}
@@ -573,7 +577,10 @@ void BlenderSync::sync_camera_motion(BL::RenderSettings& b_render,
float fov = 2.0f * atanf((0.5f * sensor_size) / bcam.lens / aspectratio);
if(fov != cam->fov) {
VLOG(1) << "Camera " << b_ob.name() << " FOV change detected.";
- if(motion_time == -1.0f) {
+ if(motion_time == 0.0f) {
+ cam->fov = fov;
+ }
+ else if(motion_time == -1.0f) {
cam->fov_pre = fov;
cam->use_perspective_motion = true;
}