forked from bartvdbraak/blender
Tidy up the user interface for depth of field based on feedback by
NudelZ on irc, thanks!
This commit is contained in:
parent
fd2b4a74c8
commit
c48ebb44ae
@ -456,10 +456,12 @@ class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
|
|||||||
sub = col.row()
|
sub = col.row()
|
||||||
sub.active = cam.dof_object is None
|
sub.active = cam.dof_object is None
|
||||||
sub.prop(cam, "dof_distance", text="Distance")
|
sub.prop(cam, "dof_distance", text="Distance")
|
||||||
col.prop(dof_options, "fstop")
|
sub = col.column(align=True)
|
||||||
col.prop(dof_options, "use_high_quality")
|
sub.label("Viewport:")
|
||||||
|
sub.prop(dof_options, "use_high_quality")
|
||||||
|
sub.prop(dof_options, "fstop")
|
||||||
if dof_options.use_high_quality:
|
if dof_options.use_high_quality:
|
||||||
col.prop(dof_options, "blades")
|
sub.prop(dof_options, "blades")
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
|
|
||||||
|
@ -184,15 +184,15 @@ class DATA_PT_camera_dof(CameraButtonsPanel, Panel):
|
|||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="Focus:")
|
col.label(text="Focus:")
|
||||||
col.prop(cam, "dof_object", text="")
|
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 = col.column()
|
||||||
sub.active = (cam.dof_object is None)
|
sub.active = (cam.dof_object is None)
|
||||||
sub.prop(cam, "dof_distance", text="Distance")
|
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:
|
if dof_options.use_high_quality:
|
||||||
col.prop(dof_options, "blades")
|
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);
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "fstop", PROP_FLOAT, PROP_NONE);
|
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_range(prop, 0.0f, FLT_MAX);
|
||||||
RNA_def_property_ui_range(prop, 0.1f, 128.0f, 10, 1);
|
RNA_def_property_ui_range(prop, 0.1f, 128.0f, 10, 1);
|
||||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "blades", PROP_INT, PROP_NONE);
|
prop = RNA_def_property(srna, "blades", PROP_INT, PROP_NONE);
|
||||||
RNA_def_property_int_sdna(prop, NULL, "num_blades");
|
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_range(prop, 0, 16);
|
||||||
RNA_def_property_int_funcs(prop, NULL, "rna_GPUDOFSettings_blades_set", NULL);
|
RNA_def_property_int_funcs(prop, NULL, "rna_GPUDOFSettings_blades_set", NULL);
|
||||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user