diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-05-17 17:57:31 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-17 18:59:26 +0300 |
commit | bc3139d79226896cf6c2b0813a1188eda70fad09 (patch) | |
tree | e5c7f1f878b4769def10e2ddbc75aacebda4afd5 /source/blender/alembic | |
parent | 043299ab69ca47a42fc8ca4f629727f8a6a2dd31 (diff) |
Cycles/Eevee: unify depth of field settings for cameras
There is now a checkbox to enable/disable depth of field per camera. For Eevee
this replace the scene level setting. For Cycles there is now only an F-Stop
value, no longer a Radius.
Existing files are converted based on Cycles or Eevee being set in the scene.
Differential Revision: https://developer.blender.org/D4882
Diffstat (limited to 'source/blender/alembic')
-rw-r--r-- | source/blender/alembic/intern/abc_camera.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/alembic/intern/abc_camera.cc b/source/blender/alembic/intern/abc_camera.cc index b15608703de..dc7f00b63d9 100644 --- a/source/blender/alembic/intern/abc_camera.cc +++ b/source/blender/alembic/intern/abc_camera.cc @@ -80,19 +80,19 @@ void AbcCameraWriter::do_write() m_camera_sample.setNearClippingPlane(cam->clip_start); m_camera_sample.setFarClippingPlane(cam->clip_end); - if (cam->dof_ob) { - Imath::V3f v(m_object->loc[0] - cam->dof_ob->loc[0], - m_object->loc[1] - cam->dof_ob->loc[1], - m_object->loc[2] - cam->dof_ob->loc[2]); + if (cam->dof.focus_object) { + Imath::V3f v(m_object->loc[0] - cam->dof.focus_object->loc[0], + m_object->loc[1] - cam->dof.focus_object->loc[1], + m_object->loc[2] - cam->dof.focus_object->loc[2]); m_camera_sample.setFocusDistance(v.length()); } else { - m_camera_sample.setFocusDistance(cam->gpu_dof.focus_distance); + m_camera_sample.setFocusDistance(cam->dof.focus_distance); } /* Blender camera does not have an fstop param, so try to find a custom prop * instead. */ - m_camera_sample.setFStop(cam->gpu_dof.fstop); + m_camera_sample.setFStop(cam->dof.aperture_fstop); m_camera_sample.setLensSqueezeRatio(1.0); m_camera_schema.set(m_camera_sample); @@ -166,8 +166,8 @@ void AbcCameraReader::readObjectData(Main *bmain, const ISampleSelector &sample_ bcam->shifty = v_film_offset / apperture_y / film_aspect; bcam->clip_start = max_ff(0.1f, static_cast<float>(cam_sample.getNearClippingPlane())); bcam->clip_end = static_cast<float>(cam_sample.getFarClippingPlane()); - bcam->gpu_dof.focus_distance = static_cast<float>(cam_sample.getFocusDistance()); - bcam->gpu_dof.fstop = static_cast<float>(cam_sample.getFStop()); + bcam->dof.focus_distance = static_cast<float>(cam_sample.getFocusDistance()); + bcam->dof.aperture_fstop = static_cast<float>(cam_sample.getFStop()); m_object = BKE_object_add_only_object(bmain, OB_CAMERA, m_object_name.c_str()); m_object->data = bcam; |