diff options
author | Piotr Ostrowski <postrowski> | 2020-09-30 16:56:37 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-09-30 18:20:29 +0300 |
commit | 6070f92ab94be7bd1d6729f178d71c71c4245fbb (patch) | |
tree | bacd1100dffa84ddf51fbd4d53b58eb3d29c0916 /source/blender/makesdna | |
parent | 53f20b940a1e520e131b8bb31cf0529ed4d30f9e (diff) |
Subdivision Surfaces: add boundary smooth option to modifiers
This adds the option to either smooth the entire boundary, or to keep
corners sharp, for the Subdivision Surface and Multiresolution modifiers.
This mainly helps with compatibility with other software. The default
behavior remains to smooth the entire boundary.
Differential Revision: https://developer.blender.org/D8485
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index d7a41b5cb3b..fa2f54c7aa0 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -179,13 +179,19 @@ typedef enum { SUBSURF_UV_SMOOTH_ALL = 5, } eSubsurfUVSmooth; +typedef enum { + SUBSURF_BOUNDARY_SMOOTH_ALL = 0, + SUBSURF_BOUNDARY_SMOOTH_PRESERVE_CORNERS = 1, +} eSubsurfBoundarySmooth; + typedef struct SubsurfModifierData { ModifierData modifier; short subdivType, levels, renderLevels, flags; short uv_smooth; short quality; - char _pad[4]; + short boundary_smooth; + char _pad[2]; /* TODO(sergey): Get rid of those with the old CCG subdivision code. */ void *emCache, *mCache; @@ -1042,7 +1048,8 @@ typedef struct MultiresModifierData { char simple, flags, _pad[2]; short quality; short uv_smooth; - char _pad2[4]; + short boundary_smooth; + char _pad2[2]; } MultiresModifierData; typedef enum { |