diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-23 08:26:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-23 08:26:39 +0400 |
commit | 0636886715b4c5ac56ed7f903bf37a00cfbdc841 (patch) | |
tree | 715a71459a6682f623be69b9b7d7ea52911e3be9 /source/blender/makesdna | |
parent | ed4b2d97385eb8ab6d052ea6c83e5d62f62776e6 (diff) |
add un-subdivude as an optional method for the decimate modifier, gives more even geometry & nicer results in some cases.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 16 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 2 |
2 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 05c1871ae41..f53287beb9d 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -361,15 +361,23 @@ typedef struct UVProjectModifierData { typedef struct DecimateModifierData { ModifierData modifier; - float percent; - int faceCount; /* runtime only */ + float percent; /* (mode == MOD_DECIM_MODE_COLLAPSE) */ + int iter; /* (mode == MOD_DECIM_MODE_UNSUBDIV) */ char defgrp_name[64]; /* MAX_VGROUP_NAME */ - int flag, pad; + short flag, mode; + + /* runtime only */ + int face_count; } DecimateModifierData; enum { - MOD_DECIM_INVERT_VGROUP = (1 << 0) + MOD_DECIM_FLAG_INVERT_VGROUP = (1 << 0) +}; + +enum { + MOD_DECIM_MODE_COLLAPSE, + MOD_DECIM_MODE_UNSUBDIV }; /* Smooth modifier flags */ diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 77d2b00dfc2..bef5e5cc161 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -1195,7 +1195,7 @@ int main(int argc, char **argv) } /* handy but fails on struct bounds which makesdna doesnt care about - * unless structs are nested */ + * with quite the same strictness as GCC does */ #if 0 /* include files for automatic dependencies */ |