diff options
author | Ben Batt <benbatt@gmail.com> | 2007-04-29 22:13:55 +0400 |
---|---|---|
committer | Ben Batt <benbatt@gmail.com> | 2007-04-29 22:13:55 +0400 |
commit | 125c77bca330830c5fe6dd32cc3b5d3f4c716bbb (patch) | |
tree | 7e98ea00dcf35e3f8f823ad3466ed2ab8878d55e /source/blender/makesdna | |
parent | d0ac7ef08742b439187837064da2ad2abcefb831 (diff) |
Patch #6113 - Cast & Smooth modifiers
This patch adds two modifiers: Cast and Smooth.
The Cast modifier deforms vertices into a sphere, cylinder or cuboid shape.
The location and orientation of the projection shape can be controlled by a
specified control object.
The Smooth modifier smooths the mesh in a similar way to the Edit mode "Smooth"
button.
Thanks to Willian Padovani Germano (ianwill) for the patch!
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index c5c37406c46..52ba7455284 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -26,6 +26,8 @@ typedef enum ModifierType { eModifierType_EdgeSplit, eModifierType_Displace, eModifierType_UVProject, + eModifierType_Smooth, + eModifierType_Cast, NUM_MODIFIER_TYPES } ModifierType; @@ -233,6 +235,42 @@ typedef struct DecimateModifierData { int faceCount; } DecimateModifierData; +/* Smooth modifier flags */ +#define MOD_SMOOTH_X 1<<1 +#define MOD_SMOOTH_Y 1<<2 +#define MOD_SMOOTH_Z 1<<3 + +typedef struct SmoothModifierData { + ModifierData modifier; + float fac; + char defgrp_name[32]; + short flag, repeat; + +} SmoothModifierData; + +/* Cast modifier flags */ +#define MOD_CAST_X 1<<1 +#define MOD_CAST_Y 1<<2 +#define MOD_CAST_Z 1<<3 +#define MOD_CAST_USE_OB_TRANSFORM 1<<4 +#define MOD_CAST_SIZE_FROM_RADIUS 1<<5 + +/* Cast modifier projection types */ +#define MOD_CAST_TYPE_SPHERE 0 +#define MOD_CAST_TYPE_CYLINDER 1 +#define MOD_CAST_TYPE_CUBOID 2 + +typedef struct CastModifierData { + ModifierData modifier; + + struct Object *object; + float fac; + float radius; + float size; + char defgrp_name[32]; + short flag, type; +} CastModifierData; + enum { MOD_WAV_MAP_LOCAL, MOD_WAV_MAP_GLOBAL, |