diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-13 16:39:01 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-13 17:04:06 +0300 |
commit | 5c61be777f10f65fce0184d43804c2d01cb284ad (patch) | |
tree | d69200bc4367b55dea18b9ee4a0b0b774c265933 /source/blender/blenloader/intern | |
parent | aac5458fa5800cc6c0a7243c1baa13d8190fa4b0 (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/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 11 |
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 f9bf1d9baa6..fbc98a594a2 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1855,5 +1855,16 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + if (!DNA_struct_elem_find(fd->filesdna, "SubsurfModifier", "short", "quality")) { + for (Object *object = bmain->object.first; object != NULL; object = object->id.next) { + for (ModifierData *md = object->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_Subsurf) { + SubsurfModifierData *smd = (SubsurfModifierData *)md; + smd->quality = 3; + } + } + } + } } } |