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/blenloader
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/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 986f35008bd..6c5eb269c5c 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -2920,5 +2920,16 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
part->draw_as = PART_DRAW_NOT;
}
}
+
+ if (!DNA_struct_elem_find(fd->filesdna, "TriangulateModifierData", "int", "min_vertices")) {
+ for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) {
+ for (ModifierData *md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Triangulate) {
+ TriangulateModifierData *smd = (TriangulateModifierData *)md;
+ smd->min_vertices = 4;
+ }
+ }
+ }
+ }
}
}