Commit: d5b99ceb5529c43940342950e06d7939d60286b5
Author: Antony Riakiotakis
Date:   Thu Feb 12 16:18:17 2015 +0100
Branches: viewport_experiments
https://developer.blender.org/rBd5b99ceb5529c43940342950e06d7939d60286b5

3D Viewport only uses DOF when rendered from camera now.

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

M       release/scripts/startup/bl_ui/properties_data_camera.py
M       release/scripts/startup/bl_ui/space_view3d.py
M       source/blender/blenkernel/intern/screen.c
M       source/blender/blenloader/intern/writefile.c
M       source/blender/editors/space_view3d/view3d_draw.c

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

diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py 
b/release/scripts/startup/bl_ui/properties_data_camera.py
index c2c9365..8a2805e 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -203,6 +203,7 @@ class DATA_PT_camera_gpu_dof(Panel):
         dof_options = cam.gpu_dof
         col = layout.column(align=True)
         col.label("Focus object or distance is set in Depth Of Field Panel")
+        col.label("Focal length and sensor also influence the effect")
         col.prop(dof_options, "fstop")
 
     @classmethod
diff --git a/release/scripts/startup/bl_ui/space_view3d.py 
b/release/scripts/startup/bl_ui/space_view3d.py
index 2ab7ac5..d167a35 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2940,13 +2940,6 @@ class VIEW3D_PT_view3d_shading(Panel):
             if view.depth_of_field:
                 if (view.region_3d.view_perspective == 'CAMERA'):
                     col.label("check dof properties in camera settings", 
icon='INFO')
-                else:
-                    dof_options = fx_options.dof
-                    subcol = col.column(align=True)
-                    subcol.prop(dof_options, "focus_distance")
-                    subcol.prop(dof_options, "fstop")
-                    subcol.prop(dof_options, "focal_length")
-                    subcol.prop(dof_options, "sensor")
 
             col.prop(view, "ssao")
             if view.ssao:
diff --git a/source/blender/blenkernel/intern/screen.c 
b/source/blender/blenkernel/intern/screen.c
index d891818..16e5528 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -601,14 +601,7 @@ float BKE_screen_view3d_zoom_from_fac(float zoomfac)
 
 void BKE_screen_view3d_ensure_FX(View3D *v3d)
 {
-       if (!v3d->fx_options.dof || !v3d->fx_options.ssao) {
-               v3d->fx_options.dof = MEM_callocN(sizeof(GPUDOFOptions), 
"view3d dof options");
-
-               v3d->fx_options.dof->fstop = 128.0f;
-               v3d->fx_options.dof->focal_length = 1.0f;
-               v3d->fx_options.dof->focus_distance = 1.0f;
-               v3d->fx_options.dof->sensor = 1.0f;
-
+       if (!v3d->fx_options.ssao) {
                v3d->fx_options.ssao = MEM_callocN(sizeof(GPUSSAOOptions), 
"view3d ssao options");
 
                v3d->fx_options.ssao->darkening = 1.0f;
diff --git a/source/blender/blenloader/intern/writefile.c 
b/source/blender/blenloader/intern/writefile.c
index 9d0e9c0..1a763c4 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2650,8 +2650,6 @@ static void write_screens(WriteData *wd, ListBase 
*scrbase)
                                                writestruct(wd, DATA, "BGpic", 
1, bgpic);
                                        if (v3d->localvd) writestruct(wd, DATA, 
"View3D", 1, v3d->localvd);
 
-                                       if (v3d->fx_options.dof)
-                                               writestruct(wd, DATA, 
"GPUDOFOptions", 1, v3d->fx_options.dof);
                                        if (v3d->fx_options.ssao)
                                                writestruct(wd, DATA, 
"GPUSSAOOptions", 1, v3d->fx_options.ssao);
                                }
diff --git a/source/blender/editors/space_view3d/view3d_draw.c 
b/source/blender/editors/space_view3d/view3d_draw.c
index f497078..d95c63a 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -3513,7 +3513,9 @@ static void view3d_main_area_draw_objects(const bContext 
*C, Scene *scene, View3
                
                if (rv3d->persp == RV3D_CAMOB && v3d->camera)
                        BKE_GPU_dof_from_camera(v3d->camera, &options);
-
+               else {
+                       options.dof = NULL;
+               }
                do_compositing = GPU_initialize_fx_passes(rv3d->compositor, 
&ar->winrct, &ar->drawrct, v3d->shader_fx, &options);
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to