forked from bartvdbraak/blender
Fix T55754: DOF with new Camera is not working
Was due to non initialized gpu_dof.ratio
This commit is contained in:
parent
45addee39e
commit
cfaea24117
@ -76,6 +76,9 @@ void BKE_camera_init(Camera *cam)
|
||||
cam->flag |= CAM_SHOWPASSEPARTOUT;
|
||||
cam->passepartalpha = 0.5f;
|
||||
|
||||
cam->gpu_dof.fstop = 128.0f;
|
||||
cam->gpu_dof.ratio = 1.0f;
|
||||
|
||||
/* stereoscopy 3d */
|
||||
cam->stereo.interocular_distance = 0.065f;
|
||||
cam->stereo.convergence_distance = 30.f * 0.065f;
|
||||
|
@ -4092,6 +4092,7 @@ static void rna_def_gpu_dof_fx(BlenderRNA *brna)
|
||||
|
||||
prop = RNA_def_property(srna, "fstop", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_ui_text(prop, "F-stop", "F-stop for dof effect");
|
||||
RNA_def_property_float_default(prop, 128.0f);
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.1f, 128.0f, 10, 1);
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPUDOFSettings_update");
|
||||
@ -4110,6 +4111,7 @@ static void rna_def_gpu_dof_fx(BlenderRNA *brna)
|
||||
|
||||
prop = RNA_def_property(srna, "ratio", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_ui_text(prop, "Ratio", "Distortion to simulate anamorphic lens bokeh");
|
||||
RNA_def_property_float_default(prop, 1.0f);
|
||||
RNA_def_property_range(prop, 0.0000001f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 1.0f, 2.0f, 0.1, 3);
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user