Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2018-06-27 13:55:49 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-06-27 13:59:01 +0300
commit20b8e1d8f1ebc4091f59e9bca32264717849a39b (patch)
tree09cabce715e9cdd0b09308a826e6b1d3d32f203a /source/blender/makesrna
parentcf2dcd57c0a6211de22abbf2c40a6eed80d77416 (diff)
Workbench: Added a quality slider for the viewport
Currently only attached to the Anti Aliasing of the solid mode of the viewport. But eventually we could add other options here. Quality setting can be found in the System tab of the userpref. The slider goes from No Antialiasing (0.0 - 0.1) to FXAA (0.1 - 0.25) to TAA8 (0.25 - 0.6) to TAA16 (0.6 - 0.8) to TAA32 (0.8 - 1.0)
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 6a5f8f5aaa6..5e96c8b7ef4 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -4173,13 +4173,6 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static const EnumPropertyItem gpu_antialias_method_items[] = {
- {USER_AA_NONE, "OFF", 0, "Off", "Disable Anti Alias in viewport"},
- {USER_AA_FXAA, "FXAA", 0, "FXAA", "Use FXAA, a fast screenspace Anti Alias method"},
- {USER_AA_TAA8, "TAA8", 0, "TAA 8x", "Use TAA with 8 samples when screen is static, when not static fallback to FXAA"},
- {0, NULL, 0, NULL, NULL}
- };
-
srna = RNA_def_struct(brna, "UserPreferencesSystem", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
@@ -4438,13 +4431,14 @@ static void rna_def_userdef_system(BlenderRNA *brna)
"Draw tool/property regions over the main region, when using Triple Buffer");
RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
- prop = RNA_def_property(srna, "max_anti_alias_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "gpu_viewport_antialias");
- RNA_def_property_enum_items(prop, gpu_antialias_method_items);
- RNA_def_property_ui_text(prop, "Viewport Anti-aliasing",
- "Method to draw the Anti-Aliasing in the viewport");
+ prop = RNA_def_property(srna, "gpu_viewport_quality", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "gpu_viewport_quality");
+ RNA_def_property_float_default(prop, 0.6f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Viewport Quality", "Quality setting for Solid mode rendering in the 3d viewport");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+
#ifdef WITH_OPENSUBDIV
prop = RNA_def_property(srna, "opensubdiv_compute_type", PROP_ENUM, PROP_NONE);
RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);