diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-04 12:49:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-04 19:56:11 +0300 |
commit | 455ca1b28f140482f2834c9bba0adc730aff6637 (patch) | |
tree | 33203edd53c9bbc8b0b8cd8a897487952597c298 /source/blender/blenloader/intern | |
parent | c64f491f9f45d802bc3a3cb168255dc680ea0d13 (diff) |
BMesh decimate, improve behavior with weights
Add slider to adjust the influence of weights relative to geometry distortion.
This allows subtle influences to be applied - without drastic changes in behavior.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index df985448ccd..37c255620d9 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -830,5 +830,19 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) scene->r.simplify_particles_render = scene->r.simplify_particles; } } + + if (!DNA_struct_elem_find(fd->filesdna, "DecimateModifierData", "float", "defgrp_factor")) { + Object *ob; + + for (ob = main->object.first; ob; ob = ob->id.next) { + ModifierData *md; + for (md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_Decimate) { + DecimateModifierData *dmd = (DecimateModifierData *)md; + dmd->defgrp_factor = 1.0f; + } + } + } + } } } |