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 /release/scripts/startup/bl_ui | |
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 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_camera.py | 27 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_render.py | 6 |
2 files changed, 18 insertions, 15 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 6ba3ad4e334..3181dab7b8a 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -212,19 +212,27 @@ class DATA_PT_camera(CameraButtonsPanel, Panel): class DATA_PT_camera_dof(CameraButtonsPanel, Panel): bl_label = "Depth of Field" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw_header(self, context): + cam = context.camera + dof = cam.dof + self.layout.prop(dof, "use_dof", text="") + def draw(self, context): layout = self.layout layout.use_property_split = True cam = context.camera + dof = cam.dof + layout.active = dof.use_dof col = layout.column() - col.prop(cam, "dof_object", text="Focus on Object") + col.prop(dof, "focus_object", text="Focus on Object") sub = col.column() - sub.active = (cam.dof_object is None) - sub.prop(cam, "dof_distance", text="Focus Distance") + sub.active = (dof.focus_object is None) + sub.prop(dof, "focus_distance", text="Focus Distance") class DATA_PT_camera_dof_aperture(CameraButtonsPanel, Panel): @@ -237,17 +245,18 @@ class DATA_PT_camera_dof_aperture(CameraButtonsPanel, Panel): layout.use_property_split = True cam = context.camera - dof_options = cam.gpu_dof + dof = cam.dof + layout.active = dof.use_dof flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) col = flow.column() - col.prop(dof_options, "fstop") - col.prop(dof_options, "blades") + col.prop(dof, "aperture_fstop") col = flow.column() - col.prop(dof_options, "rotation") - col.prop(dof_options, "ratio") + col.prop(dof, "aperture_blades") + col.prop(dof, "aperture_rotation") + col.prop(dof, "aperture_ratio") class DATA_PT_camera_background_image(CameraButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index b99e2b9d731..45a492c0ff7 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -183,18 +183,12 @@ class RENDER_PT_eevee_depth_of_field(RenderButtonsPanel, Panel): def poll(cls, context): return (context.engine in cls.COMPAT_ENGINES) - def draw_header(self, context): - scene = context.scene - props = scene.eevee - self.layout.prop(props, "use_dof", text="") - def draw(self, context): layout = self.layout layout.use_property_split = True scene = context.scene props = scene.eevee - layout.active = props.use_dof col = layout.column() col.prop(props, "bokeh_max_size") # Not supported yet |