Tidy up the user interface for depth of field based on feedback by

NudelZ on irc, thanks!
This commit is contained in:
Antony Riakiotakis 2015-03-23 12:48:09 +01:00
parent fd2b4a74c8
commit c48ebb44ae
3 changed files with 12 additions and 10 deletions

@ -456,10 +456,12 @@ class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
sub = col.row()
sub.active = cam.dof_object is None
sub.prop(cam, "dof_distance", text="Distance")
col.prop(dof_options, "fstop")
col.prop(dof_options, "use_high_quality")
sub = col.column(align=True)
sub.label("Viewport:")
sub.prop(dof_options, "use_high_quality")
sub.prop(dof_options, "fstop")
if dof_options.use_high_quality:
col.prop(dof_options, "blades")
sub.prop(dof_options, "blades")
col = split.column()

@ -184,15 +184,15 @@ class DATA_PT_camera_dof(CameraButtonsPanel, Panel):
col = split.column()
col.label(text="Focus:")
col.prop(cam, "dof_object", text="")
col.prop(dof_options, "use_high_quality")
col = split.column()
col.prop(dof_options, "fstop")
sub = col.column()
sub.active = (cam.dof_object is None)
sub.prop(cam, "dof_distance", text="Distance")
col = split.column(align=True)
col.label("Viewport:")
col.prop(dof_options, "use_high_quality")
col.prop(dof_options, "fstop")
if dof_options.use_high_quality:
col.prop(dof_options, "blades")

@ -3931,14 +3931,14 @@ static void rna_def_gpu_dof_fx(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "fstop", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Viewport F-stop", "F-stop for dof effect");
RNA_def_property_ui_text(prop, "F-stop", "F-stop for dof effect");
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, NULL);
prop = RNA_def_property(srna, "blades", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "num_blades");
RNA_def_property_ui_text(prop, "Viewport Camera Blades", "Blades for dof effect");
RNA_def_property_ui_text(prop, "Blades", "Blades for dof effect");
RNA_def_property_range(prop, 0, 16);
RNA_def_property_int_funcs(prop, NULL, "rna_GPUDOFSettings_blades_set", NULL);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);