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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-08-13 16:39:01 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-08-13 17:04:06 +0300
commit5c61be777f10f65fce0184d43804c2d01cb284ad (patch)
treed69200bc4367b55dea18b9ee4a0b0b774c265933 /source/blender/makesrna/intern/rna_modifier.c
parentaac5458fa5800cc6c0a7243c1baa13d8190fa4b0 (diff)
Subsurf: Introduce quality option
For users it defines how accurate vertex positions are in terms of limit surface (as in, how close the vertices locations to the condition when they are calculated for an infinitely subdivided mesh). This affects things like: - Irregular vertices (joint of 3 or more edges) - Crease Keep quality value low for performance. NOTE: Going higher does not necessarily mean real improvement in quality, ideal case might be reached well before maximum quality of 10. Quality of 3 is a good starting point. Internally quality is translated directly to adaptive subdivision level. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D3599
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index eeeee5d4c9a..50907503aca 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -1249,6 +1249,15 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_uv_smooth_items);
RNA_def_property_ui_text(prop, "UV Smooth", "Controls how smoothing is applied to UVs");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+#ifdef WITH_OPENSUBDIV_MODIFIER
+ prop = RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "quality");
+ RNA_def_property_range(prop, 1, 10);
+ RNA_def_property_ui_range(prop, 1, 6, 1, -1);
+ RNA_def_property_ui_text(prop, "Quality", "Accuracy of vertex positions, lower value is faster but less precise");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+#endif
}
static void rna_def_modifier_generic_map_info(StructRNA *srna)