[Bf-blender-cvs] [49efb7bdbe5] master: Camera: change default f-stop from 5.6 to 2.8

Brecht Van Lommel noreply at git.blender.org
Mon May 20 16:40:37 CEST 2019


Commit: 49efb7bdbe5643f0a24f045419e5f280ad5f5734
Author: Brecht Van Lommel
Date:   Mon May 20 16:14:02 2019 +0200
Branches: master
https://developer.blender.org/rB49efb7bdbe5643f0a24f045419e5f280ad5f5734

Camera: change default f-stop from 5.6 to 2.8

This gives a more noticeable effect by default. Also fixes startup.blend not
having focus distance initialized correctly.

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/blenkernel/intern/camera.c
M	source/blender/blenloader/intern/versioning_cycles.c
M	source/blender/blenloader/intern/versioning_defaults.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index cc84d27d4d4..5a90e0ef80c 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2240,13 +2240,13 @@ class VIEW3D_MT_object_context_menu(Menu):
                 props.input_scale = 0.01
                 props.header_text = "Camera Lens Scale: %.3f"
 
-            if not obj.data.dof_object:
+            if not obj.data.dof.focus_object:
                 if view and view.camera == obj and view.region_3d.view_perspective == 'CAMERA':
                     props = layout.operator("ui.eyedropper_depth", text="DOF Distance (Pick)")
                 else:
                     props = layout.operator("wm.context_modal_mouse", text="DOF Distance")
                     props.data_path_iter = "selected_editable_objects"
-                    props.data_path_item = "data.dof_distance"
+                    props.data_path_item = "data.dof.focus_distance"
                     props.input_scale = 0.02
                     props.header_text = "DOF Distance: %.3f"
 
diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c
index a17cbb29550..a8f38c3c4ce 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -66,7 +66,7 @@ void BKE_camera_init(Camera *cam)
   cam->flag |= CAM_SHOWPASSEPARTOUT;
   cam->passepartalpha = 0.5f;
 
-  cam->dof.aperture_fstop = 5.6f;
+  cam->dof.aperture_fstop = 2.8f;
   cam->dof.aperture_ratio = 1.0f;
   cam->dof.focus_distance = 10.0f;
 
diff --git a/source/blender/blenloader/intern/versioning_cycles.c b/source/blender/blenloader/intern/versioning_cycles.c
index 93813df3c13..9bfbf4477ab 100644
--- a/source/blender/blenloader/intern/versioning_cycles.c
+++ b/source/blender/blenloader/intern/versioning_cycles.c
@@ -523,7 +523,7 @@ void do_versions_after_linking_cycles(Main *bmain)
         }
 
         /* No depth of field, set default settings. */
-        camera->dof.aperture_fstop = 5.6f;
+        camera->dof.aperture_fstop = 2.8f;
         camera->dof.aperture_blades = 0;
         camera->dof.aperture_rotation = 0.0f;
         camera->dof.aperture_ratio = 1.0f;
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 83a21a5480d..338d1d1ff90 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -26,6 +26,7 @@
 #include "BLI_string.h"
 #include "BLI_system.h"
 
+#include "DNA_camera_types.h"
 #include "DNA_gpencil_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_object_types.h"
@@ -406,6 +407,12 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
       /* Match default for new meshes. */
       mesh->smoothresh = DEG2RADF(30);
     }
+
+    for (Camera *camera = bmain->cameras.first; camera; camera = camera->id.next) {
+      /* Initialize to a useful value. */
+      camera->dof.focus_distance = 10.0f;
+      camera->dof.aperture_fstop = 2.8f;
+    }
   }
 
   for (bScreen *sc = bmain->screens.first; sc; sc = sc->id.next) {



More information about the Bf-blender-cvs mailing list