UI: minor re-organization of dof options
This commit is contained in:
parent
bd1e5eeab7
commit
eee538f0d2
|
@ -184,16 +184,18 @@ 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")
|
||||
col.prop(dof_options, "high_quality")
|
||||
if dof_options.high_quality:
|
||||
col.prop(dof_options, "num_blades")
|
||||
|
||||
sub = col.column()
|
||||
sub.active = cam.dof_object is None
|
||||
sub.active = (cam.dof_object is None)
|
||||
sub.prop(cam, "dof_distance", text="Distance")
|
||||
|
||||
if dof_options.use_high_quality:
|
||||
col.prop(dof_options, "blades")
|
||||
|
||||
|
||||
class DATA_PT_camera_display(CameraButtonsPanel, Panel):
|
||||
bl_label = "Display"
|
||||
|
|
|
@ -3922,13 +3922,14 @@ static void rna_def_gpu_dof_fx(BlenderRNA *brna)
|
|||
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, "num_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_ui_text(prop, "Viewport Camera 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);
|
||||
|
||||
prop = RNA_def_property(srna, "high_quality", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "use_high_quality", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "high_quality", 1);
|
||||
RNA_def_property_ui_text(prop, "High Quality", "Use high quality depth of field");
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
||||
|
|
Loading…
Reference in New Issue