diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-19 20:00:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-03-19 22:08:22 +0300 |
commit | eee538f0d262a430cc622bfe17eef7dba9b251c7 (patch) | |
tree | 798d715efdeb15be97df41826b4eb5e9ee7461d2 | |
parent | bd1e5eeab7a8459755b59672f494609f84ab8302 (diff) |
UI: minor re-organization of dof options
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_camera.py | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 2097e82f992..6a0d680df53 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -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" diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 4214c830e4c..2e941487e98 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -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); |