Blender  V2.59
DNA_modifier_types.h
Go to the documentation of this file.
00001 /*
00002  * $Id: DNA_modifier_types.h 38866 2011-07-31 02:24:06Z nicholasbishop $ 
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * ***** END GPL LICENSE BLOCK *****
00021  */
00022 
00023 #ifndef DNA_MODIFIER_TYPES_H
00024 #define DNA_MODIFIER_TYPES_H
00025 
00030 #include "DNA_listBase.h"
00031 
00032 
00033 #define MODSTACK_DEBUG 1
00034 
00035 /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! */
00036 
00037 typedef enum ModifierType {
00038         eModifierType_None = 0,
00039         eModifierType_Subsurf,
00040         eModifierType_Lattice,
00041         eModifierType_Curve,
00042         eModifierType_Build,
00043         eModifierType_Mirror,
00044         eModifierType_Decimate,
00045         eModifierType_Wave,
00046         eModifierType_Armature,
00047         eModifierType_Hook,
00048         eModifierType_Softbody,
00049         eModifierType_Boolean,
00050         eModifierType_Array,
00051         eModifierType_EdgeSplit,
00052         eModifierType_Displace,
00053         eModifierType_UVProject,
00054         eModifierType_Smooth,
00055         eModifierType_Cast,
00056         eModifierType_MeshDeform,
00057         eModifierType_ParticleSystem,
00058         eModifierType_ParticleInstance,
00059         eModifierType_Explode,
00060         eModifierType_Cloth,
00061         eModifierType_Collision,
00062         eModifierType_Bevel,
00063         eModifierType_Shrinkwrap,
00064         eModifierType_Fluidsim,
00065         eModifierType_Mask,
00066         eModifierType_SimpleDeform,
00067         eModifierType_Multires,
00068         eModifierType_Surface,
00069         eModifierType_Smoke,
00070         eModifierType_ShapeKey,
00071         eModifierType_Solidify,
00072         eModifierType_Screw,
00073         eModifierType_Warp,
00074         NUM_MODIFIER_TYPES
00075 } ModifierType;
00076 
00077 typedef enum ModifierMode {
00078         eModifierMode_Realtime = (1<<0),
00079         eModifierMode_Render = (1<<1),
00080         eModifierMode_Editmode = (1<<2),
00081         eModifierMode_OnCage = (1<<3),
00082         eModifierMode_Expanded = (1<<4),
00083         eModifierMode_Virtual = (1<<5),
00084         eModifierMode_ApplyOnSpline = (1<<6),
00085         eModifierMode_DisableTemporary = (1 << 31)
00086 } ModifierMode;
00087 
00088 typedef struct ModifierData {
00089         struct ModifierData *next, *prev;
00090 
00091         int type, mode;
00092         int stackindex, pad;
00093         char name[32];
00094         
00095         /* XXX for timing info set by caller... solve later? (ton) */
00096         struct Scene *scene;
00097         
00098         char *error;
00099 } ModifierData;
00100 
00101 typedef enum {
00102         eSubsurfModifierFlag_Incremental = (1<<0),
00103         eSubsurfModifierFlag_DebugIncr = (1<<1),
00104         eSubsurfModifierFlag_ControlEdges = (1<<2),
00105         eSubsurfModifierFlag_SubsurfUv = (1<<3)
00106 } SubsurfModifierFlag;
00107 
00108 /* not a real modifier */
00109 typedef struct MappingInfoModifierData {
00110         ModifierData modifier;
00111 
00112         struct Tex *texture;
00113         struct Object *map_object;
00114         char uvlayer_name[32];
00115         int uvlayer_tmp;
00116         int texmapping;
00117 } MappingInfoModifierData;
00118 
00119 typedef struct SubsurfModifierData {
00120         ModifierData modifier;
00121 
00122         short subdivType, levels, renderLevels, flags;
00123 
00124         void *emCache, *mCache;
00125 } SubsurfModifierData;
00126 
00127 typedef struct LatticeModifierData {
00128         ModifierData modifier;
00129 
00130         struct Object *object;
00131         char name[32];                  /* optional vertexgroup name */
00132 } LatticeModifierData;
00133 
00134 typedef struct CurveModifierData {
00135         ModifierData modifier;
00136 
00137         struct Object *object;
00138         char name[32];                  /* optional vertexgroup name */
00139         short defaxis;                  /* axis along which curve deforms */
00140         char pad[6];
00141 } CurveModifierData;
00142 
00143 /* CurveModifierData->defaxis */
00144 #define MOD_CURVE_POSX  1
00145 #define MOD_CURVE_POSY  2
00146 #define MOD_CURVE_POSZ  3
00147 #define MOD_CURVE_NEGX  4
00148 #define MOD_CURVE_NEGY  5
00149 #define MOD_CURVE_NEGZ  6
00150 
00151 typedef struct BuildModifierData {
00152         ModifierData modifier;
00153 
00154         float start, length;
00155         int randomize, seed;
00156 } BuildModifierData;
00157 
00158 /* Mask Modifier */
00159 typedef struct MaskModifierData {
00160         ModifierData modifier;
00161         
00162         struct Object *ob_arm;  /* armature to use to in place of hardcoded vgroup */
00163         char vgroup[32];                /* name of vertex group to use to mask */
00164         
00165         int mode;                               /* using armature or hardcoded vgroup */
00166         int flag;                               /* flags for various things */
00167 } MaskModifierData;
00168 
00169 /* Mask Modifier -> mode */
00170 #define MOD_MASK_MODE_VGROUP            0
00171 #define MOD_MASK_MODE_ARM                       1
00172 
00173 /* Mask Modifier -> flag */
00174 #define MOD_MASK_INV                    (1<<0)
00175 
00176 typedef struct ArrayModifierData {
00177         ModifierData modifier;
00178 
00179         /* the object with which to cap the start of the array  */
00180         struct Object *start_cap;
00181         /* the object with which to cap the end of the array  */
00182         struct Object *end_cap;
00183         /* the curve object to use for MOD_ARR_FITCURVE */
00184         struct Object *curve_ob;
00185         /* the object to use for object offset */
00186         struct Object *offset_ob;
00187         /* a constant duplicate offset;
00188            1 means the duplicates are 1 unit apart
00189         */
00190         float offset[3];
00191         /* a scaled factor for duplicate offsets;
00192            1 means the duplicates are 1 object-width apart
00193         */
00194         float scale[3];
00195         /* the length over which to distribute the duplicates */
00196         float length;
00197         /* the limit below which to merge vertices in adjacent duplicates */
00198         float merge_dist;
00199         /* determines how duplicate count is calculated; one of:
00200                   MOD_ARR_FIXEDCOUNT -> fixed
00201                   MOD_ARR_FITLENGTH  -> calculated to fit a set length
00202                   MOD_ARR_FITCURVE   -> calculated to fit the length of a Curve object
00203         */
00204         int fit_type;
00205         /* flags specifying how total offset is calculated; binary OR of:
00206                  MOD_ARR_OFF_CONST    -> total offset += offset
00207                  MOD_ARR_OFF_RELATIVE -> total offset += relative * object width
00208                  MOD_ARR_OFF_OBJ      -> total offset += offset_ob's matrix
00209            total offset is the sum of the individual enabled offsets
00210         */
00211         int offset_type;
00212         /* general flags:
00213                   MOD_ARR_MERGE -> merge vertices in adjacent duplicates
00214         */
00215         int flags;
00216         /* the number of duplicates to generate for MOD_ARR_FIXEDCOUNT */
00217         int count;
00218 } ArrayModifierData;
00219 
00220 /* ArrayModifierData->fit_type */
00221 #define MOD_ARR_FIXEDCOUNT 0
00222 #define MOD_ARR_FITLENGTH  1
00223 #define MOD_ARR_FITCURVE   2
00224 
00225 /* ArrayModifierData->offset_type */
00226 #define MOD_ARR_OFF_CONST    (1<<0)
00227 #define MOD_ARR_OFF_RELATIVE (1<<1)
00228 #define MOD_ARR_OFF_OBJ      (1<<2)
00229 
00230 /* ArrayModifierData->flags */
00231 #define MOD_ARR_MERGE      (1<<0)
00232 #define MOD_ARR_MERGEFINAL (1<<1)
00233 
00234 typedef struct MirrorModifierData {
00235         ModifierData modifier;
00236 
00237         short axis; /* deprecated, use flag instead */
00238         short flag;
00239         float tolerance;
00240         struct Object *mirror_ob;
00241 } MirrorModifierData;
00242 
00243 /* MirrorModifierData->flag */
00244 #define MOD_MIR_CLIPPING        (1<<0)
00245 #define MOD_MIR_MIRROR_U        (1<<1)
00246 #define MOD_MIR_MIRROR_V        (1<<2)
00247 #define MOD_MIR_AXIS_X          (1<<3)
00248 #define MOD_MIR_AXIS_Y          (1<<4)
00249 #define MOD_MIR_AXIS_Z          (1<<5)
00250 #define MOD_MIR_VGROUP          (1<<6)
00251 #define MOD_MIR_NO_MERGE        (1<<7)
00252 
00253 typedef struct EdgeSplitModifierData {
00254         ModifierData modifier;
00255 
00256         float split_angle;    /* angle above which edges should be split */
00257         int flags;
00258 } EdgeSplitModifierData;
00259 
00260 /* EdgeSplitModifierData->flags */
00261 #define MOD_EDGESPLIT_FROMANGLE   (1<<1)
00262 #define MOD_EDGESPLIT_FROMFLAG    (1<<2)
00263 
00264 typedef struct BevelModifierData {
00265         ModifierData modifier;
00266 
00267         float value;          /* the "raw" bevel value (distance/amount to bevel) */
00268         int res;              /* the resolution (as originally coded, it is the number of recursive bevels) */
00269         int pad;
00270         short flags;          /* general option flags */
00271         short val_flags;      /* flags used to interpret the bevel value */
00272         short lim_flags;      /* flags to tell the tool how to limit the bevel */
00273         short e_flags;        /* flags to direct how edge weights are applied to verts */
00274         float bevel_angle;    /* if the BME_BEVEL_ANGLE is set, this will be how "sharp" an edge must be before it gets beveled */
00275         char defgrp_name[32]; /* if the BME_BEVEL_VWEIGHT option is set, this will be the name of the vert group */
00276 } BevelModifierData;
00277 
00278 typedef struct BMeshModifierData {
00279         ModifierData modifier;
00280 
00281         float pad;
00282         int type;
00283 } BMeshModifierData;
00284 
00285 
00286 /* Smoke modifier flags */
00287 #define MOD_SMOKE_TYPE_DOMAIN (1 << 0)
00288 #define MOD_SMOKE_TYPE_FLOW (1 << 1)
00289 #define MOD_SMOKE_TYPE_COLL (1 << 2)
00290 
00291 typedef struct SmokeModifierData {
00292         ModifierData modifier;
00293 
00294         struct SmokeDomainSettings *domain;
00295         struct SmokeFlowSettings *flow; /* inflow, outflow, smoke objects */
00296         struct SmokeCollSettings *coll; /* collision objects */
00297         float time;
00298         int type;  /* domain, inflow, outflow, ... */
00299 } SmokeModifierData;
00300 
00301 typedef struct DisplaceModifierData {
00302         ModifierData modifier;
00303 
00304         /* keep in sync with MappingInfoModifierData */
00305         struct Tex *texture;
00306         struct Object *map_object;
00307         char uvlayer_name[32];
00308         int uvlayer_tmp;
00309         int texmapping;
00310         int pad10;
00311         /* end MappingInfoModifierData */
00312 
00313         float strength;
00314         int direction;
00315         char defgrp_name[32];
00316         float midlevel;
00317 } DisplaceModifierData;
00318 
00319 /* DisplaceModifierData->direction */
00320 enum {
00321         MOD_DISP_DIR_X,
00322         MOD_DISP_DIR_Y,
00323         MOD_DISP_DIR_Z,
00324         MOD_DISP_DIR_NOR,
00325         MOD_DISP_DIR_RGB_XYZ,
00326 };
00327 
00328 /* DisplaceModifierData->texmapping */
00329 enum {
00330         MOD_DISP_MAP_LOCAL,
00331         MOD_DISP_MAP_GLOBAL,
00332         MOD_DISP_MAP_OBJECT,
00333         MOD_DISP_MAP_UV,
00334 };
00335 
00336 typedef struct UVProjectModifierData {
00337         ModifierData modifier;
00338 
00339         /* the objects which do the projecting */
00340         struct Object *projectors[10]; /* MOD_UVPROJECT_MAX */
00341         struct Image *image;      /* the image to project */
00342         int flags;
00343         int num_projectors;
00344         float aspectx, aspecty;
00345         float scalex, scaley;                                                                                           
00346         char uvlayer_name[32];
00347         int uvlayer_tmp, pad;
00348 } UVProjectModifierData;
00349 
00350 #define MOD_UVPROJECT_MAXPROJECTORS 10
00351 
00352 /* UVProjectModifierData->flags */
00353 #define MOD_UVPROJECT_OVERRIDEIMAGE (1<<0)
00354 
00355 typedef struct DecimateModifierData {
00356         ModifierData modifier;
00357 
00358         float percent;
00359         int faceCount;
00360 } DecimateModifierData;
00361 
00362 /* Smooth modifier flags */
00363 #define MOD_SMOOTH_X (1<<1)
00364 #define MOD_SMOOTH_Y (1<<2)
00365 #define MOD_SMOOTH_Z (1<<3)
00366 
00367 typedef struct SmoothModifierData {
00368         ModifierData modifier;
00369         float fac;
00370         char defgrp_name[32];
00371         short flag, repeat;
00372 
00373 } SmoothModifierData;
00374 
00375 /* Cast modifier flags */
00376 #define MOD_CAST_X (1<<1)
00377 #define MOD_CAST_Y (1<<2)
00378 #define MOD_CAST_Z (1<<3)
00379 #define MOD_CAST_USE_OB_TRANSFORM (1<<4)
00380 #define MOD_CAST_SIZE_FROM_RADIUS (1<<5)
00381 
00382 /* Cast modifier projection types */
00383 #define MOD_CAST_TYPE_SPHERE 0
00384 #define MOD_CAST_TYPE_CYLINDER 1
00385 #define MOD_CAST_TYPE_CUBOID 2
00386 
00387 typedef struct CastModifierData {
00388         ModifierData modifier;
00389 
00390         struct Object *object;
00391         float fac;
00392         float radius;
00393         float size;
00394         char defgrp_name[32];
00395         short flag, type;
00396 } CastModifierData;
00397 
00398 enum {
00399         MOD_WAV_MAP_LOCAL,
00400         MOD_WAV_MAP_GLOBAL,
00401         MOD_WAV_MAP_OBJECT,
00402         MOD_WAV_MAP_UV,
00403 };
00404 
00405 /* WaveModifierData.flag */
00406 #define MOD_WAVE_X      (1<<1)
00407 #define MOD_WAVE_Y      (1<<2)
00408 #define MOD_WAVE_CYCL   (1<<3)
00409 #define MOD_WAVE_NORM   (1<<4)
00410 #define MOD_WAVE_NORM_X (1<<5)
00411 #define MOD_WAVE_NORM_Y (1<<6)
00412 #define MOD_WAVE_NORM_Z (1<<7)
00413 
00414 typedef struct WaveModifierData {
00415         ModifierData modifier;
00416 
00417         struct Object *objectcenter;
00418         char defgrp_name[32];
00419         struct Tex *texture;
00420         struct Object *map_object;
00421 
00422         short flag, pad;
00423 
00424         float startx, starty, height, width;
00425         float narrow, speed, damp, falloff;
00426 
00427         int texmapping, uvlayer_tmp;
00428 
00429         char uvlayer_name[32];
00430 
00431         float timeoffs, lifetime;
00432         float pad1;
00433 } WaveModifierData;
00434 
00435 typedef struct ArmatureModifierData {
00436         ModifierData modifier;
00437 
00438         short deformflag, multi;                /* deformflag replaces armature->deformflag */
00439         int pad2;
00440         struct Object *object;
00441         float *prevCos;         /* stored input of previous modifier, for vertexgroup blending */
00442         char defgrp_name[32];
00443 } ArmatureModifierData;
00444 
00445 typedef struct HookModifierData {
00446         ModifierData modifier;
00447 
00448         struct Object *object;
00449         char subtarget[32];             /* optional name of bone target */
00450         
00451         float parentinv[4][4];  /* matrix making current transform unmodified */
00452         float cent[3];                  /* visualization of hook */
00453         float falloff;                  /* if not zero, falloff is distance where influence zero */
00454         
00455         int *indexar;                   /* if NULL, it's using vertexgroup */
00456         int totindex;
00457         float force;
00458         char name[32];                  /* optional vertexgroup name */
00459 } HookModifierData;
00460 
00461 typedef struct SoftbodyModifierData {
00462         ModifierData modifier;
00463 } SoftbodyModifierData;
00464 
00465 typedef struct ClothModifierData {
00466         ModifierData            modifier;
00467 
00468         struct Scene *scene;                    /* the context, time etc is here */
00469         struct Cloth *clothObject;              /* The internal data structure for cloth. */
00470         struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.h */
00471         struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_types.h */
00472         struct PointCache *point_cache; /* definition is in DNA_object_force.h */
00473         struct ListBase ptcaches;
00474 } ClothModifierData;
00475 
00476 typedef struct CollisionModifierData {
00477         ModifierData    modifier;
00478         
00479         struct MVert *x; /* position at the beginning of the frame */
00480         struct MVert *xnew; /* position at the end of the frame */
00481         struct MVert *xold; /* unsued atm, but was discussed during sprint */
00482         struct MVert *current_xnew; /* new position at the actual inter-frame step */
00483         struct MVert *current_x; /* position at the actual inter-frame step */
00484         struct MVert *current_v; /* (xnew - x) at the actual inter-frame step */
00485         
00486         struct MFace *mfaces; /* object face data */
00487         
00488         unsigned int numverts;
00489         unsigned int numfaces;
00490         float time_x, time_xnew;                /* cfra time of modifier */
00491         struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */
00492 } CollisionModifierData;
00493 
00494 typedef struct SurfaceModifierData {
00495         ModifierData    modifier;
00496 
00497         struct MVert *x; /* old position */
00498         struct MVert *v; /* velocity */
00499 
00500         struct DerivedMesh *dm;
00501 
00502         struct BVHTreeFromMesh *bvhtree; /* bounding volume hierarchy of the mesh faces */
00503 
00504         int cfra, numverts;
00505 } SurfaceModifierData;
00506 
00507 typedef enum {
00508         eBooleanModifierOp_Intersect,
00509         eBooleanModifierOp_Union,
00510         eBooleanModifierOp_Difference,
00511 } BooleanModifierOp;
00512 typedef struct BooleanModifierData {
00513         ModifierData modifier;
00514 
00515         struct Object *object;
00516         int operation, pad;
00517 } BooleanModifierData;
00518 
00519 #define MOD_MDEF_INVERT_VGROUP  (1<<0)
00520 #define MOD_MDEF_DYNAMIC_BIND   (1<<1)
00521 
00522 #define MOD_MDEF_VOLUME                 0
00523 #define MOD_MDEF_SURFACE                1
00524 
00525 typedef struct MDefInfluence {
00526         int vertex;
00527         float weight;
00528 } MDefInfluence;
00529 
00530 typedef struct MDefCell {
00531         int offset;
00532         int totinfluence;
00533 } MDefCell;
00534 
00535 typedef struct MeshDeformModifierData {
00536         ModifierData modifier;
00537 
00538         struct Object *object;                  /* mesh object */
00539         char defgrp_name[32];                   /* optional vertexgroup name */
00540 
00541         short gridsize, flag, mode, pad;
00542 
00543         /* result of static binding */
00544         MDefInfluence *bindinfluences;  /* influences */
00545         int *bindoffsets;                               /* offsets into influences array */
00546         float *bindcagecos;                             /* coordinates that cage was bound with */
00547         int totvert, totcagevert;               /* total vertices in mesh and cage */
00548 
00549         /* result of dynamic binding */
00550         MDefCell *dyngrid;                              /* grid with dynamic binding cell points */
00551         MDefInfluence *dyninfluences;   /* dynamic binding vertex influences */
00552         int *dynverts, *pad2;                   /* is this vertex bound or not? */
00553         int dyngridsize;                                /* size of the dynamic bind grid */
00554         int totinfluence;                               /* total number of vertex influences */
00555         float dyncellmin[3];                    /* offset of the dynamic bind grid */
00556         float dyncellwidth;                             /* width of dynamic bind cell */
00557         float bindmat[4][4];                    /* matrix of cage at binding time */
00558 
00559         /* deprecated storage */
00560         float *bindweights;                             /* deprecated inefficient storage */
00561         float *bindcos;                                 /* deprecated storage of cage coords */
00562 
00563         /* runtime */
00564         void (*bindfunc)(struct Scene *scene,
00565                 struct MeshDeformModifierData *mmd,
00566                 float *vertexcos, int totvert, float cagemat[][4]);
00567 } MeshDeformModifierData;
00568 
00569 typedef enum {
00570         eParticleSystemFlag_Pars =                      (1<<0),
00571         eParticleSystemFlag_psys_updated =      (1<<1),
00572         eParticleSystemFlag_file_loaded =       (1<<2),
00573 } ParticleSystemModifierFlag;
00574 
00575 typedef struct ParticleSystemModifierData {
00576         ModifierData modifier;
00577         struct ParticleSystem *psys;
00578         struct DerivedMesh *dm;
00579         int totdmvert, totdmedge, totdmface;
00580         short flag, rt;
00581 } ParticleSystemModifierData;
00582 
00583 typedef enum {
00584         eParticleInstanceFlag_Parents =         (1<<0),
00585         eParticleInstanceFlag_Children =        (1<<1),
00586         eParticleInstanceFlag_Path =            (1<<2),
00587         eParticleInstanceFlag_Unborn =          (1<<3),
00588         eParticleInstanceFlag_Alive =           (1<<4),
00589         eParticleInstanceFlag_Dead =            (1<<5),
00590         eParticleInstanceFlag_KeepShape =       (1<<6),
00591         eParticleInstanceFlag_UseSize =         (1<<7),
00592 } ParticleInstanceModifierFlag;
00593 
00594 typedef struct ParticleInstanceModifierData {
00595         ModifierData modifier;
00596         struct Object *ob;
00597         short psys, flag, axis, rt;
00598         float position, random_position;
00599 } ParticleInstanceModifierData;
00600 
00601 typedef enum {
00602         eExplodeFlag_CalcFaces =        (1<<0),
00603         eExplodeFlag_PaSize =           (1<<1),
00604         eExplodeFlag_EdgeCut =          (1<<2),
00605         eExplodeFlag_Unborn =           (1<<3),
00606         eExplodeFlag_Alive =            (1<<4),
00607         eExplodeFlag_Dead =                     (1<<5),
00608 } ExplodeModifierFlag;
00609 
00610 typedef struct ExplodeModifierData {
00611         ModifierData modifier;
00612         int *facepa;
00613         short flag, vgroup;
00614         float protect;
00615         char uvname[32];
00616 } ExplodeModifierData;
00617 
00618 typedef struct MultiresModifierData {
00619         ModifierData modifier;
00620 
00621         char lvl, sculptlvl, renderlvl, totlvl;
00622         char simple, flags, pad[2];
00623 } MultiresModifierData;
00624 
00625 typedef enum {
00626         eMultiresModifierFlag_ControlEdges = (1<<0),
00627         eMultiresModifierFlag_PlainUv = (1<<1),
00628 } MultiresModifierFlag;
00629 
00630 typedef struct FluidsimModifierData {
00631         ModifierData modifier;
00632         
00633         struct FluidsimSettings *fss; /* definition is in DNA_object_fluidsim.h */
00634         struct PointCache *point_cache; /* definition is in DNA_object_force.h */
00635 } FluidsimModifierData;
00636 
00637 typedef struct ShrinkwrapModifierData {
00638         ModifierData modifier;
00639 
00640         struct Object *target;  /* shrink target */
00641         struct Object *auxTarget; /* additional shrink target */
00642         char vgroup_name[32];   /* optional vertexgroup name */
00643         float keepDist;                 /* distance offset to keep from mesh/projection point */
00644         short shrinkType;               /* shrink type projection */
00645         short shrinkOpts;               /* shrink options */
00646         char projAxis;                  /* axis to project over */
00647 
00648         /*
00649          * if using projection over vertex normal this controls the
00650          * the level of subsurface that must be done before getting the
00651          * vertex coordinates and normal
00652          */
00653         char subsurfLevels;
00654 
00655         char pad[6];
00656 
00657 } ShrinkwrapModifierData;
00658 
00659 /* Shrinkwrap->shrinkType */
00660 #define MOD_SHRINKWRAP_NEAREST_SURFACE  0
00661 #define MOD_SHRINKWRAP_PROJECT                  1
00662 #define MOD_SHRINKWRAP_NEAREST_VERTEX   2
00663 
00664 /* Shrinkwrap->shrinkOpts */
00665 #define MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR    (1<<0)  /* allow shrinkwrap to move the vertex in the positive direction of axis */
00666 #define MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR    (1<<1)  /* allow shrinkwrap to move the vertex in the negative direction of axis */
00667 
00668 #define MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE    (1<<3)  /* ignore vertex moves if a vertex ends projected on a front face of the target */
00669 #define MOD_SHRINKWRAP_CULL_TARGET_BACKFACE             (1<<4)  /* ignore vertex moves if a vertex ends projected on a back face of the target */
00670 
00671 #define MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE               (1<<5)  /* distance is measure to the front face of the target */
00672 
00673 #define MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS              (1<<0)
00674 #define MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS              (1<<1)
00675 #define MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS              (1<<2)
00676 #define MOD_SHRINKWRAP_PROJECT_OVER_NORMAL                      0       /* projection over normal is used if no axis is selected */
00677 
00678 
00679 typedef struct SimpleDeformModifierData {
00680         ModifierData modifier;
00681 
00682         struct Object *origin;  /* object to control the origin of modifier space coordinates */
00683         char vgroup_name[32];   /* optional vertexgroup name */
00684         float factor;                   /* factors to control simple deforms */
00685         float limit[2];                 /* lower and upper limit */             
00686 
00687         char mode;                              /* deform function */
00688         char axis;                              /* lock axis (for taper and strech) */
00689         char originOpts;                /* originOptions */
00690         char pad;
00691 
00692 } SimpleDeformModifierData;
00693 
00694 #define MOD_SIMPLEDEFORM_MODE_TWIST             1
00695 #define MOD_SIMPLEDEFORM_MODE_BEND              2
00696 #define MOD_SIMPLEDEFORM_MODE_TAPER             3
00697 #define MOD_SIMPLEDEFORM_MODE_STRETCH   4
00698 
00699 #define MOD_SIMPLEDEFORM_LOCK_AXIS_X                    (1<<0)
00700 #define MOD_SIMPLEDEFORM_LOCK_AXIS_Y                    (1<<1)
00701 
00702 /* indicates whether simple deform should use the local
00703    coordinates or global coordinates of origin */
00704 #define MOD_SIMPLEDEFORM_ORIGIN_LOCAL                   (1<<0)
00705 
00706 #define MOD_UVPROJECT_MAX                               10
00707 
00708 typedef struct ShapeKeyModifierData {
00709         ModifierData modifier;
00710 } ShapeKeyModifierData;
00711 
00712 typedef struct SolidifyModifierData {
00713         ModifierData modifier;
00714 
00715         char defgrp_name[32];           /* name of vertex group to use */
00716         float offset;                   /* new surface offset level*/
00717         float offset_fac;               /* midpoint of the offset  */
00718         float crease_inner;
00719         float crease_outer;
00720         float crease_rim;
00721         int flag;
00722         short mat_ofs;
00723         short mat_ofs_rim;
00724         int pad;
00725 } SolidifyModifierData;
00726 
00727 #define MOD_SOLIDIFY_RIM                        (1<<0)
00728 #define MOD_SOLIDIFY_EVEN                       (1<<1)
00729 #define MOD_SOLIDIFY_NORMAL_CALC        (1<<2)
00730 #define MOD_SOLIDIFY_VGROUP_INV         (1<<3)
00731 #define MOD_SOLIDIFY_RIM_MATERIAL       (1<<4) /* deprecated, used in do_versions */
00732 
00733 typedef struct ScrewModifierData {
00734         ModifierData modifier;
00735         struct Object *ob_axis;
00736         int             steps;
00737         int             render_steps;
00738         int             iter;
00739         float   screw_ofs;
00740         float   angle;
00741         short   axis;
00742         short   flag;
00743 } ScrewModifierData;
00744 
00745 #define MOD_SCREW_NORMAL_FLIP   (1<<0)
00746 #define MOD_SCREW_NORMAL_CALC   (1<<1)
00747 #define MOD_SCREW_OBJECT_OFFSET (1<<2)
00748 // #define MOD_SCREW_OBJECT_ANGLE       (1<<4)
00749 
00750 typedef struct WarpModifierData {
00751         ModifierData modifier;
00752 
00753         /* keep in sync with MappingInfoModifierData */
00754         struct Tex *texture;
00755         struct Object *map_object;
00756         char uvlayer_name[32];
00757         int uvlayer_tmp;
00758         int texmapping;
00759         int pad10;
00760         /* end MappingInfoModifierData */
00761 
00762         float strength;
00763 
00764         struct Object *object_from;
00765         struct Object *object_to;
00766         struct CurveMapping *curfalloff;
00767         char defgrp_name[32];                   /* optional vertexgroup name */
00768         float falloff_radius;
00769         char flag; /* not used yet */
00770         char falloff_type;
00771         char pad[2];
00772 } WarpModifierData;
00773 
00774 #define MOD_WARP_VOLUME_PRESERVE 1
00775 
00776 typedef enum {
00777         eWarp_Falloff_None =            0,
00778         eWarp_Falloff_Curve =           1,
00779         eWarp_Falloff_Sharp =           2, /* PROP_SHARP */
00780         eWarp_Falloff_Smooth =          3, /* PROP_SMOOTH */
00781         eWarp_Falloff_Root =            4, /* PROP_ROOT */
00782         eWarp_Falloff_Linear =          5, /* PROP_LIN */
00783         eWarp_Falloff_Const =           6, /* PROP_CONST */
00784         eWarp_Falloff_Sphere =          7, /* PROP_SPHERE */
00785         /* PROP_RANDOM not used */
00786 } WarpModifierFalloff;
00787 
00788 #endif