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:
authorIsh Bosamiya <ishbosamiya>2019-03-22 19:55:51 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-22 20:11:14 +0300
commitda5b6ed75bf08141dd19a0cc143d1a91b14a0f24 (patch)
tree761250222839c8c9800de88329d153a5ce7daf10 /source/blender/makesrna/intern/rna_modifier.c
parentc89dcc89e6ebc3882f66b3536a51bae83807ad6b (diff)
Modifiers: add minimum number of vertices to triangulate modifier.
This lets you only triangulate n-gons when setting the number to 5 or more. Differential Revision: https://developer.blender.org/D4367
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 00dec553dcd..a0d37d34526 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -4359,6 +4359,12 @@ static void rna_def_modifier_triangulate(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Polygon Method", "Method for splitting the polygons into triangles");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ prop = RNA_def_property(srna, "min_vertices", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "min_vertices");
+ RNA_def_property_range(prop, 4, INT_MAX);
+ RNA_def_property_ui_text(prop, "Minimum Vertices", "Triangulate only polygons with vertex count greater than or equal to this number");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
prop = RNA_def_property(srna, "keep_custom_normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_TRIANGULATE_KEEP_CUSTOMLOOP_NORMALS);
RNA_def_property_ui_text(prop, "Keep Normals",