[Bf-blender-cvs] [eee538f] master: UI: minor re-organization of dof options
Campbell Barton
noreply at git.blender.org
Thu Mar 19 20:09:06 CET 2015
Commit: eee538f0d262a430cc622bfe17eef7dba9b251c7
Author: Campbell Barton
Date: Fri Mar 20 04:00:05 2015 +1100
Branches: master
https://developer.blender.org/rBeee538f0d262a430cc622bfe17eef7dba9b251c7
UI: minor re-organization of dof options
===================================================================
M release/scripts/startup/bl_ui/properties_data_camera.py
M source/blender/makesrna/intern/rna_scene.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index 2097e82..6a0d680 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 4214c83..2e94148 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);
More information about the Bf-blender-cvs
mailing list