diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-03-31 18:06:17 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-03-31 19:27:37 +0300 |
commit | 6c036a65c9741786deb53191fa77d83e7ffb1be3 (patch) | |
tree | 3f9ab727fb309727991a48598c965528c2ae3b20 /source/blender/blenloader | |
parent | 38685b5a3976954634b441858cf9c5df65bbe83f (diff) |
Add Voxel Mode to the Remesh modifier
This adds the Voxel Mode to the current remesh modifier. It works
exactly the same way as the voxel remesh operator and uses the same
properties to control the remeshing. We can exand this with more options
in the future (fix poles, reprojection...)
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D7292
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 50b1e385dd4..b3c0473e173 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -4878,5 +4878,18 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) */ { /* Keep this block, even when empty. */ + + /* Remesh Modifier Voxel Mode. */ + if (!DNA_struct_elem_find(fd->filesdna, "RemeshModifierData", "float", "voxel_size")) { + 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_Remesh) { + RemeshModifierData *rmd = (RemeshModifierData *)md; + rmd->voxel_size = 0.1f; + rmd->adaptivity = 0.0f; + } + } + } + } } } |