2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * ***** END GPL LICENSE BLOCK *****
21 /** \file DNA_modifier_types.h
25 #ifndef __DNA_MODIFIER_TYPES_H__
26 #define __DNA_MODIFIER_TYPES_H__
29 #include "DNA_listBase.h"
31 /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE!
32 * (ONLY ADD NEW ITEMS AT THE END)
35 typedef enum ModifierType {
36 eModifierType_None = 0,
37 eModifierType_Subsurf = 1,
38 eModifierType_Lattice = 2,
39 eModifierType_Curve = 3,
40 eModifierType_Build = 4,
41 eModifierType_Mirror = 5,
42 eModifierType_Decimate = 6,
43 eModifierType_Wave = 7,
44 eModifierType_Armature = 8,
45 eModifierType_Hook = 9,
46 eModifierType_Softbody = 10,
47 eModifierType_Boolean = 11,
48 eModifierType_Array = 12,
49 eModifierType_EdgeSplit = 13,
50 eModifierType_Displace = 14,
51 eModifierType_UVProject = 15,
52 eModifierType_Smooth = 16,
53 eModifierType_Cast = 17,
54 eModifierType_MeshDeform = 18,
55 eModifierType_ParticleSystem = 19,
56 eModifierType_ParticleInstance = 20,
57 eModifierType_Explode = 21,
58 eModifierType_Cloth = 22,
59 eModifierType_Collision = 23,
60 eModifierType_Bevel = 24,
61 eModifierType_Shrinkwrap = 25,
62 eModifierType_Fluidsim = 26,
63 eModifierType_Mask = 27,
64 eModifierType_SimpleDeform = 28,
65 eModifierType_Multires = 29,
66 eModifierType_Surface = 30,
67 eModifierType_Smoke = 31,
68 eModifierType_ShapeKey = 32,
69 eModifierType_Solidify = 33,
70 eModifierType_Screw = 34,
71 eModifierType_Warp = 35,
72 eModifierType_WeightVGEdit = 36,
73 eModifierType_WeightVGMix = 37,
74 eModifierType_WeightVGProximity = 38,
75 eModifierType_Ocean = 39,
76 eModifierType_DynamicPaint = 40,
77 eModifierType_Remesh = 41,
78 eModifierType_Skin = 42,
79 eModifierType_LaplacianSmooth = 43,
80 eModifierType_Triangulate = 44,
81 eModifierType_UVWarp = 45,
82 eModifierType_MeshCache = 46,
83 eModifierType_LaplacianDeform = 47,
84 eModifierType_Wireframe = 48,
85 eModifierType_DataTransfer = 49,
86 eModifierType_NormalEdit = 50,
87 eModifierType_CorrectiveSmooth = 51,
91 typedef enum ModifierMode {
92 eModifierMode_Realtime = (1 << 0),
93 eModifierMode_Render = (1 << 1),
94 eModifierMode_Editmode = (1 << 2),
95 eModifierMode_OnCage = (1 << 3),
96 eModifierMode_Expanded = (1 << 4),
97 eModifierMode_Virtual = (1 << 5),
98 eModifierMode_ApplyOnSpline = (1 << 6),
99 eModifierMode_DisableTemporary = (1 << 31)
102 typedef struct ModifierData {
103 struct ModifierData *next, *prev;
107 char name[64]; /* MAX_NAME */
109 /* XXX for timing info set by caller... solve later? (ton) */
116 eSubsurfModifierFlag_Incremental = (1 << 0),
117 eSubsurfModifierFlag_DebugIncr = (1 << 1),
118 eSubsurfModifierFlag_ControlEdges = (1 << 2),
119 eSubsurfModifierFlag_SubsurfUv = (1 << 3),
120 } SubsurfModifierFlag;
122 /* not a real modifier */
123 typedef struct MappingInfoModifierData {
124 ModifierData modifier;
127 struct Object *map_object;
128 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
131 } MappingInfoModifierData;
133 typedef struct SubsurfModifierData {
134 ModifierData modifier;
136 short subdivType, levels, renderLevels, flags;
137 short use_opensubdiv, pad[3];
139 void *emCache, *mCache;
140 } SubsurfModifierData;
142 typedef struct LatticeModifierData {
143 ModifierData modifier;
145 struct Object *object;
146 char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
149 } LatticeModifierData;
151 typedef struct CurveModifierData {
152 ModifierData modifier;
154 struct Object *object;
155 char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
156 short defaxis; /* axis along which curve deforms */
160 /* CurveModifierData->defaxis */
170 typedef struct BuildModifierData {
171 ModifierData modifier;
176 short randomize; /* (bool) whether order of vertices is randomized - legacy files (for readfile conversion) */
177 int seed; /* (int) random seed */
180 /* Build Modifier -> flag */
182 MOD_BUILD_FLAG_RANDOMIZE = (1 << 0), /* order of vertices is randomized */
183 MOD_BUILD_FLAG_REVERSE = (1 << 1), /* frame range is reversed, resulting in a deconstruction effect */
187 typedef struct MaskModifierData {
188 ModifierData modifier;
190 struct Object *ob_arm; /* armature to use to in place of hardcoded vgroup */
191 char vgroup[64]; /* name of vertex group to use to mask, MAX_VGROUP_NAME */
193 int mode; /* using armature or hardcoded vgroup */
194 int flag; /* flags for various things */
197 /* Mask Modifier -> mode */
199 MOD_MASK_MODE_VGROUP = 0,
200 MOD_MASK_MODE_ARM = 1,
203 /* Mask Modifier -> flag */
205 MOD_MASK_INV = (1 << 0),
208 typedef struct ArrayModifierData {
209 ModifierData modifier;
211 /* the object with which to cap the start of the array */
212 struct Object *start_cap;
213 /* the object with which to cap the end of the array */
214 struct Object *end_cap;
215 /* the curve object to use for MOD_ARR_FITCURVE */
216 struct Object *curve_ob;
217 /* the object to use for object offset */
218 struct Object *offset_ob;
219 /* a constant duplicate offset;
220 * 1 means the duplicates are 1 unit apart
223 /* a scaled factor for duplicate offsets;
224 * 1 means the duplicates are 1 object-width apart
227 /* the length over which to distribute the duplicates */
229 /* the limit below which to merge vertices in adjacent duplicates */
231 /* determines how duplicate count is calculated; one of:
232 * - MOD_ARR_FIXEDCOUNT -> fixed
233 * - MOD_ARR_FITLENGTH -> calculated to fit a set length
234 * - MOD_ARR_FITCURVE -> calculated to fit the length of a Curve object
237 /* flags specifying how total offset is calculated; binary OR of:
238 * - MOD_ARR_OFF_CONST -> total offset += offset
239 * - MOD_ARR_OFF_RELATIVE -> total offset += relative * object width
240 * - MOD_ARR_OFF_OBJ -> total offset += offset_ob's matrix
241 * total offset is the sum of the individual enabled offsets
245 * MOD_ARR_MERGE -> merge vertices in adjacent duplicates
248 /* the number of duplicates to generate for MOD_ARR_FIXEDCOUNT */
252 /* ArrayModifierData->fit_type */
254 MOD_ARR_FIXEDCOUNT = 0,
255 MOD_ARR_FITLENGTH = 1,
256 MOD_ARR_FITCURVE = 2,
259 /* ArrayModifierData->offset_type */
261 MOD_ARR_OFF_CONST = (1 << 0),
262 MOD_ARR_OFF_RELATIVE = (1 << 1),
263 MOD_ARR_OFF_OBJ = (1 << 2),
266 /* ArrayModifierData->flags */
268 MOD_ARR_MERGE = (1 << 0),
269 MOD_ARR_MERGEFINAL = (1 << 1),
272 typedef struct MirrorModifierData {
273 ModifierData modifier;
275 short axis DNA_DEPRECATED; /* deprecated, use flag instead */
278 struct Object *mirror_ob;
279 } MirrorModifierData;
281 /* MirrorModifierData->flag */
283 MOD_MIR_CLIPPING = (1 << 0),
284 MOD_MIR_MIRROR_U = (1 << 1),
285 MOD_MIR_MIRROR_V = (1 << 2),
286 MOD_MIR_AXIS_X = (1 << 3),
287 MOD_MIR_AXIS_Y = (1 << 4),
288 MOD_MIR_AXIS_Z = (1 << 5),
289 MOD_MIR_VGROUP = (1 << 6),
290 MOD_MIR_NO_MERGE = (1 << 7),
293 typedef struct EdgeSplitModifierData {
294 ModifierData modifier;
296 float split_angle; /* angle above which edges should be split */
298 } EdgeSplitModifierData;
300 /* EdgeSplitModifierData->flags */
302 MOD_EDGESPLIT_FROMANGLE = (1 << 1),
303 MOD_EDGESPLIT_FROMFLAG = (1 << 2),
306 typedef struct BevelModifierData {
307 ModifierData modifier;
309 float value; /* the "raw" bevel value (distance/amount to bevel) */
310 int res; /* the resolution (as originally coded, it is the number of recursive bevels) */
311 short flags; /* general option flags */
312 short val_flags; /* used to interpret the bevel value */
313 short lim_flags; /* flags to tell the tool how to limit the bevel */
314 short e_flags; /* flags to direct how edge weights are applied to verts */
315 short mat; /* material index if >= 0, else material inherited from surrounding faces */
318 float profile; /* controls profile shape (0->1, .5 is round) */
319 /* if the MOD_BEVEL_ANGLE is set, this will be how "sharp" an edge must be before it gets beveled */
321 /* if the MOD_BEVEL_VWEIGHT option is set, this will be the name of the vert group, MAX_VGROUP_NAME */
322 char defgrp_name[64];
325 /* BevelModifierData->flags and BevelModifierData->lim_flags */
327 MOD_BEVEL_VERT = (1 << 1),
328 /* MOD_BEVEL_RADIUS = (1 << 2), */
329 MOD_BEVEL_ANGLE = (1 << 3),
330 MOD_BEVEL_WEIGHT = (1 << 4),
331 MOD_BEVEL_VGROUP = (1 << 5),
332 MOD_BEVEL_EMIN = (1 << 7),
333 MOD_BEVEL_EMAX = (1 << 8),
334 /* MOD_BEVEL_RUNNING = (1 << 9), */
335 /* MOD_BEVEL_RES = (1 << 10), */
336 /* This is a new setting not related to old (trunk bmesh bevel code)
337 * but adding here because they are mixed - campbell
339 /* MOD_BEVEL_EVEN = (1 << 11), */
340 /* MOD_BEVEL_DIST = (1 << 12), */ /* same as above */
341 MOD_BEVEL_OVERLAP_OK = (1 << 13),
342 MOD_BEVEL_EVEN_WIDTHS = (1 << 14),
345 /* BevelModifierData->val_flags (not used as flags any more) */
347 MOD_BEVEL_AMT_OFFSET = 0,
348 MOD_BEVEL_AMT_WIDTH = 1,
349 MOD_BEVEL_AMT_DEPTH = 2,
350 MOD_BEVEL_AMT_PERCENT = 3,
353 typedef struct SmokeModifierData {
354 ModifierData modifier;
356 struct SmokeDomainSettings *domain;
357 struct SmokeFlowSettings *flow; /* inflow, outflow, smoke objects */
358 struct SmokeCollSettings *coll; /* collision objects */
360 int type; /* domain, inflow, outflow, ... */
363 /* Smoke modifier flags */
365 MOD_SMOKE_TYPE_DOMAIN = (1 << 0),
366 MOD_SMOKE_TYPE_FLOW = (1 << 1),
367 MOD_SMOKE_TYPE_COLL = (1 << 2),
370 typedef struct DisplaceModifierData {
371 ModifierData modifier;
373 /* keep in sync with MappingInfoModifierData */
375 struct Object *map_object;
376 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
379 /* end MappingInfoModifierData */
383 char defgrp_name[64]; /* MAX_VGROUP_NAME */
386 } DisplaceModifierData;
388 /* DisplaceModifierData->direction */
393 MOD_DISP_DIR_NOR = 3,
394 MOD_DISP_DIR_RGB_XYZ = 4,
395 MOD_DISP_DIR_CLNOR = 5,
398 /* DisplaceModifierData->texmapping */
400 MOD_DISP_MAP_LOCAL = 0,
401 MOD_DISP_MAP_GLOBAL = 1,
402 MOD_DISP_MAP_OBJECT = 2,
406 typedef struct UVProjectModifierData {
407 ModifierData modifier;
409 /* the objects which do the projecting */
410 struct Object *projectors[10]; /* MOD_UVPROJECT_MAXPROJECTORS */
411 struct Image *image; /* the image to project */
414 float aspectx, aspecty;
415 float scalex, scaley;
416 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
417 int uvlayer_tmp, pad;
418 } UVProjectModifierData;
420 #define MOD_UVPROJECT_MAXPROJECTORS 10
422 /* UVProjectModifierData->flags */
424 MOD_UVPROJECT_OVERRIDEIMAGE = (1 << 0),
427 typedef struct DecimateModifierData {
428 ModifierData modifier;
430 float percent; /* (mode == MOD_DECIM_MODE_COLLAPSE) */
431 short iter; /* (mode == MOD_DECIM_MODE_UNSUBDIV) */
432 char delimit; /* (mode == MOD_DECIM_MODE_DISSOLVE) */
433 char symmetry_axis; /* (mode == MOD_DECIM_MODE_COLLAPSE) */
434 float angle; /* (mode == MOD_DECIM_MODE_DISSOLVE) */
436 char defgrp_name[64]; /* MAX_VGROUP_NAME */
442 } DecimateModifierData;
445 MOD_DECIM_FLAG_INVERT_VGROUP = (1 << 0),
446 MOD_DECIM_FLAG_TRIANGULATE = (1 << 1), /* for collapse only. dont convert tri pairs back to quads */
447 MOD_DECIM_FLAG_ALL_BOUNDARY_VERTS = (1 << 2), /* for dissolve only. collapse all verts between 2 faces */
448 MOD_DECIM_FLAG_SYMMETRY = (1 << 3),
452 MOD_DECIM_MODE_COLLAPSE,
453 MOD_DECIM_MODE_UNSUBDIV,
454 MOD_DECIM_MODE_DISSOLVE, /* called planar in the UI */
457 typedef struct SmoothModifierData {
458 ModifierData modifier;
460 char defgrp_name[64]; /* MAX_VGROUP_NAME */
463 } SmoothModifierData;
465 /* Smooth modifier flags */
467 MOD_SMOOTH_X = (1 << 1),
468 MOD_SMOOTH_Y = (1 << 2),
469 MOD_SMOOTH_Z = (1 << 3),
472 typedef struct CastModifierData {
473 ModifierData modifier;
475 struct Object *object;
479 char defgrp_name[64]; /* MAX_VGROUP_NAME */
483 /* Cast modifier flags */
485 /* And what bout (1 << 0) flag? ;) */
486 MOD_CAST_X = (1 << 1),
487 MOD_CAST_Y = (1 << 2),
488 MOD_CAST_Z = (1 << 3),
489 MOD_CAST_USE_OB_TRANSFORM = (1 << 4),
490 MOD_CAST_SIZE_FROM_RADIUS = (1 << 5),
493 /* Cast modifier projection types */
495 MOD_CAST_TYPE_SPHERE = 0,
496 MOD_CAST_TYPE_CYLINDER = 1,
497 MOD_CAST_TYPE_CUBOID = 2,
500 typedef struct WaveModifierData {
501 ModifierData modifier;
503 /* keep in sync with MappingInfoModifierData */
505 struct Object *map_object;
506 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
509 /* end MappingInfoModifierData */
511 struct Object *objectcenter;
512 char defgrp_name[64]; /* MAX_VGROUP_NAME */
516 float startx, starty, height, width;
517 float narrow, speed, damp, falloff;
519 float timeoffs, lifetime;
523 /* WaveModifierData.flag */
525 /* And what bout (1 << 0) flag? ;) */
526 MOD_WAVE_X = (1 << 1),
527 MOD_WAVE_Y = (1 << 2),
528 MOD_WAVE_CYCL = (1 << 3),
529 MOD_WAVE_NORM = (1 << 4),
530 MOD_WAVE_NORM_X = (1 << 5),
531 MOD_WAVE_NORM_Y = (1 << 6),
532 MOD_WAVE_NORM_Z = (1 << 7),
535 typedef struct ArmatureModifierData {
536 ModifierData modifier;
538 short deformflag, multi; /* deformflag replaces armature->deformflag */
540 struct Object *object;
541 float *prevCos; /* stored input of previous modifier, for vertexgroup blending */
542 char defgrp_name[64]; /* MAX_VGROUP_NAME */
543 } ArmatureModifierData;
546 MOD_HOOK_UNIFORM_SPACE = (1 << 0),
549 /* same as WarpModifierFalloff */
551 eHook_Falloff_None = 0,
552 eHook_Falloff_Curve = 1,
553 eHook_Falloff_Sharp = 2, /* PROP_SHARP */
554 eHook_Falloff_Smooth = 3, /* PROP_SMOOTH */
555 eHook_Falloff_Root = 4, /* PROP_ROOT */
556 eHook_Falloff_Linear = 5, /* PROP_LIN */
557 eHook_Falloff_Const = 6, /* PROP_CONST */
558 eHook_Falloff_Sphere = 7, /* PROP_SPHERE */
559 eHook_Falloff_InvSquare = 8, /* PROP_INVSQUARE */
560 /* PROP_RANDOM not used */
561 } HookModifierFalloff;
563 typedef struct HookModifierData {
564 ModifierData modifier;
566 struct Object *object;
567 char subtarget[64]; /* optional name of bone target, MAX_ID_NAME-2 */
570 char falloff_type; /* use enums from WarpModifier (exact same functionality) */
572 float parentinv[4][4]; /* matrix making current transform unmodified */
573 float cent[3]; /* visualization of hook */
574 float falloff; /* if not zero, falloff is distance where influence zero */
576 struct CurveMapping *curfalloff;
578 int *indexar; /* if NULL, it's using vertexgroup */
581 char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
584 typedef struct SoftbodyModifierData {
585 ModifierData modifier;
586 } SoftbodyModifierData;
588 typedef struct ClothModifierData {
589 ModifierData modifier;
591 struct Scene *scene; /* the context, time etc is here */
592 struct Cloth *clothObject; /* The internal data structure for cloth. */
593 struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.h */
594 struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_types.h */
595 struct PointCache *point_cache; /* definition is in DNA_object_force.h */
596 struct ListBase ptcaches;
597 /* XXX nasty hack, remove once hair can be separated from cloth modifier data */
598 struct ClothHairData *hairdata;
599 /* grid geometry values of hair continuum */
600 float hair_grid_min[3];
601 float hair_grid_max[3];
602 int hair_grid_res[3];
603 float hair_grid_cellsize;
605 struct ClothSolverResult *solver_result;
608 typedef struct CollisionModifierData {
609 ModifierData modifier;
611 struct MVert *x; /* position at the beginning of the frame */
612 struct MVert *xnew; /* position at the end of the frame */
613 struct MVert *xold; /* unused atm, but was discussed during sprint */
614 struct MVert *current_xnew; /* new position at the actual inter-frame step */
615 struct MVert *current_x; /* position at the actual inter-frame step */
616 struct MVert *current_v; /* (xnew - x) at the actual inter-frame step */
618 struct MVertTri *tri;
620 unsigned int mvert_num;
621 unsigned int tri_num;
622 float time_x, time_xnew; /* cfra time of modifier */
623 struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */
624 } CollisionModifierData;
626 typedef struct SurfaceModifierData {
627 ModifierData modifier;
629 struct MVert *x; /* old position */
630 struct MVert *v; /* velocity */
632 struct DerivedMesh *dm;
634 struct BVHTreeFromMesh *bvhtree; /* bounding volume hierarchy of the mesh faces */
637 } SurfaceModifierData;
639 typedef struct BooleanModifierData {
640 ModifierData modifier;
642 struct Object *object;
644 char bm_flag, pad[2];
646 } BooleanModifierData;
649 eBooleanModifierOp_Intersect = 0,
650 eBooleanModifierOp_Union = 1,
651 eBooleanModifierOp_Difference = 2,
654 /* temp bm_flag (debugging only) */
656 eBooleanModifierBMeshFlag_Enabled = (1 << 0),
657 eBooleanModifierBMeshFlag_BMesh_Separate = (1 << 1),
658 eBooleanModifierBMeshFlag_BMesh_NoDissolve = (1 << 2),
659 eBooleanModifierBMeshFlag_BMesh_NoConnectRegions = (1 << 3),
662 typedef struct MDefInfluence {
667 typedef struct MDefCell {
672 typedef struct MeshDeformModifierData {
673 ModifierData modifier;
675 struct Object *object; /* mesh object */
676 char defgrp_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
678 short gridsize, flag, pad[2];
680 /* result of static binding */
681 MDefInfluence *bindinfluences; /* influences */
682 int *bindoffsets; /* offsets into influences array */
683 float *bindcagecos; /* coordinates that cage was bound with */
684 int totvert, totcagevert; /* total vertices in mesh and cage */
686 /* result of dynamic binding */
687 MDefCell *dyngrid; /* grid with dynamic binding cell points */
688 MDefInfluence *dyninfluences; /* dynamic binding vertex influences */
689 int *dynverts; /* is this vertex bound or not? */
690 int dyngridsize; /* size of the dynamic bind grid */
691 int totinfluence; /* total number of vertex influences */
692 float dyncellmin[3]; /* offset of the dynamic bind grid */
693 float dyncellwidth; /* width of dynamic bind cell */
694 float bindmat[4][4]; /* matrix of cage at binding time */
696 /* deprecated storage */
697 float *bindweights; /* deprecated inefficient storage */
698 float *bindcos; /* deprecated storage of cage coords */
701 void (*bindfunc)(struct Scene *scene, struct MeshDeformModifierData *mmd, struct DerivedMesh *cagedm,
702 float *vertexcos, int totvert, float cagemat[4][4]);
703 } MeshDeformModifierData;
706 MOD_MDEF_INVERT_VGROUP = (1 << 0),
707 MOD_MDEF_DYNAMIC_BIND = (1 << 1),
712 MOD_MDEF_SURFACE = 1,
715 typedef struct ParticleSystemModifierData {
716 ModifierData modifier;
718 struct ParticleSystem *psys;
719 struct DerivedMesh *dm_final; /* Final DM - its topology may differ from orig mesh. */
720 struct DerivedMesh *dm_deformed; /* Deformed-onle DM - its topology is same as orig mesh one. */
721 int totdmvert, totdmedge, totdmface;
723 } ParticleSystemModifierData;
726 eParticleSystemFlag_Pars = (1 << 0),
727 eParticleSystemFlag_psys_updated = (1 << 1),
728 eParticleSystemFlag_file_loaded = (1 << 2),
729 } ParticleSystemModifierFlag;
732 eParticleInstanceFlag_Parents = (1 << 0),
733 eParticleInstanceFlag_Children = (1 << 1),
734 eParticleInstanceFlag_Path = (1 << 2),
735 eParticleInstanceFlag_Unborn = (1 << 3),
736 eParticleInstanceFlag_Alive = (1 << 4),
737 eParticleInstanceFlag_Dead = (1 << 5),
738 eParticleInstanceFlag_KeepShape = (1 << 6),
739 eParticleInstanceFlag_UseSize = (1 << 7),
740 } ParticleInstanceModifierFlag;
742 typedef struct ParticleInstanceModifierData {
743 ModifierData modifier;
746 short psys, flag, axis, pad;
747 float position, random_position;
748 } ParticleInstanceModifierData;
751 eExplodeFlag_CalcFaces = (1 << 0),
752 eExplodeFlag_PaSize = (1 << 1),
753 eExplodeFlag_EdgeCut = (1 << 2),
754 eExplodeFlag_Unborn = (1 << 3),
755 eExplodeFlag_Alive = (1 << 4),
756 eExplodeFlag_Dead = (1 << 5),
757 } ExplodeModifierFlag;
759 typedef struct ExplodeModifierData {
760 ModifierData modifier;
765 char uvname[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
766 } ExplodeModifierData;
768 typedef struct MultiresModifierData {
769 ModifierData modifier;
771 char lvl, sculptlvl, renderlvl, totlvl;
772 char simple, flags, pad[2];
773 } MultiresModifierData;
776 eMultiresModifierFlag_ControlEdges = (1 << 0),
777 eMultiresModifierFlag_PlainUv = (1 << 1),
778 } MultiresModifierFlag;
780 typedef struct FluidsimModifierData {
781 ModifierData modifier;
783 struct FluidsimSettings *fss; /* definition is in DNA_object_fluidsim.h */
784 struct PointCache *point_cache; /* definition is in DNA_object_force.h */
785 } FluidsimModifierData;
787 typedef struct ShrinkwrapModifierData {
788 ModifierData modifier;
790 struct Object *target; /* shrink target */
791 struct Object *auxTarget; /* additional shrink target */
792 char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
793 float keepDist; /* distance offset to keep from mesh/projection point */
794 short shrinkType; /* shrink type projection */
795 char shrinkOpts; /* shrink options */
797 float projLimit; /* limit the projection ray cast */
798 char projAxis; /* axis to project over */
800 /* If using projection over vertex normal this controls the level of subsurface that must be done
801 * before getting the vertex coordinates and normal
806 } ShrinkwrapModifierData;
808 /* Shrinkwrap->shrinkType */
810 MOD_SHRINKWRAP_NEAREST_SURFACE = 0,
811 MOD_SHRINKWRAP_PROJECT = 1,
812 MOD_SHRINKWRAP_NEAREST_VERTEX = 2,
815 /* Shrinkwrap->shrinkOpts */
817 /* allow shrinkwrap to move the vertex in the positive direction of axis */
818 MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR = (1 << 0),
819 /* allow shrinkwrap to move the vertex in the negative direction of axis */
820 MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR = (1 << 1),
822 /* ignore vertex moves if a vertex ends projected on a front face of the target */
823 MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE = (1 << 3),
824 /* ignore vertex moves if a vertex ends projected on a back face of the target */
825 MOD_SHRINKWRAP_CULL_TARGET_BACKFACE = (1 << 4),
827 MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE = (1 << 5), /* distance is measure to the front face of the target */
830 /* Shrinkwrap->projAxis */
832 MOD_SHRINKWRAP_PROJECT_OVER_NORMAL = 0, /* projection over normal is used if no axis is selected */
833 MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS = (1 << 0),
834 MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS = (1 << 1),
835 MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS = (1 << 2),
839 typedef struct SimpleDeformModifierData {
840 ModifierData modifier;
842 struct Object *origin; /* object to control the origin of modifier space coordinates */
843 char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
844 float factor; /* factors to control simple deforms */
845 float limit[2]; /* lower and upper limit */
847 char mode; /* deform function */
848 char axis; /* lock axis (for taper and strech) */
851 } SimpleDeformModifierData;
854 MOD_SIMPLEDEFORM_MODE_TWIST = 1,
855 MOD_SIMPLEDEFORM_MODE_BEND = 2,
856 MOD_SIMPLEDEFORM_MODE_TAPER = 3,
857 MOD_SIMPLEDEFORM_MODE_STRETCH = 4,
861 MOD_SIMPLEDEFORM_LOCK_AXIS_X = (1 << 0),
862 MOD_SIMPLEDEFORM_LOCK_AXIS_Y = (1 << 1),
865 typedef struct ShapeKeyModifierData {
866 ModifierData modifier;
867 } ShapeKeyModifierData;
869 typedef struct SolidifyModifierData {
870 ModifierData modifier;
872 char defgrp_name[64]; /* name of vertex group to use, MAX_VGROUP_NAME */
873 float offset; /* new surface offset level*/
874 float offset_fac; /* midpoint of the offset */
875 /* factor for the minimum weight to use when vgroups are used, avoids 0.0 weights giving duplicate geometry */
877 float offset_clamp; /* clamp offset based on surrounding geometry */
885 } SolidifyModifierData;
888 MOD_SOLIDIFY_RIM = (1 << 0),
889 MOD_SOLIDIFY_EVEN = (1 << 1),
890 MOD_SOLIDIFY_NORMAL_CALC = (1 << 2),
891 MOD_SOLIDIFY_VGROUP_INV = (1 << 3),
892 #ifdef DNA_DEPRECATED
893 MOD_SOLIDIFY_RIM_MATERIAL = (1 << 4), /* deprecated, used in do_versions */
895 MOD_SOLIDIFY_FLIP = (1 << 5),
896 MOD_SOLIDIFY_NOSHELL = (1 << 6),
899 typedef struct ScrewModifierData {
900 ModifierData modifier;
902 struct Object *ob_axis;
904 unsigned int render_steps;
914 MOD_SCREW_NORMAL_FLIP = (1 << 0),
915 MOD_SCREW_NORMAL_CALC = (1 << 1),
916 MOD_SCREW_OBJECT_OFFSET = (1 << 2),
917 /* MOD_SCREW_OBJECT_ANGLE = (1 << 4), */
918 MOD_SCREW_SMOOTH_SHADING = (1 << 5),
919 MOD_SCREW_UV_STRETCH_U = (1 << 6),
920 MOD_SCREW_UV_STRETCH_V = (1 << 7),
923 typedef struct OceanModifierData {
924 ModifierData modifier;
927 struct OceanCache *oceancache;
938 float wave_alignment;
939 float wave_direction;
949 char cachepath[1024]; /* FILE_MAX */
950 char foamlayername[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
970 MOD_OCEAN_GEOM_GENERATE = 0,
971 MOD_OCEAN_GEOM_DISPLACE = 1,
972 MOD_OCEAN_GEOM_SIM_ONLY = 2,
976 MOD_OCEAN_REFRESH_RESET = (1 << 0),
977 MOD_OCEAN_REFRESH_SIM = (1 << 1),
978 MOD_OCEAN_REFRESH_ADD = (1 << 2),
979 MOD_OCEAN_REFRESH_CLEAR_CACHE = (1 << 3),
980 MOD_OCEAN_REFRESH_TOPOLOGY = (1 << 4),
984 MOD_OCEAN_GENERATE_FOAM = (1 << 0),
985 MOD_OCEAN_GENERATE_NORMALS = (1 << 1),
988 typedef struct WarpModifierData {
989 ModifierData modifier;
990 /* keep in sync with MappingInfoModifierData */
992 struct Object *map_object;
993 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
996 /* end MappingInfoModifierData */
998 struct Object *object_from;
999 struct Object *object_to;
1000 struct CurveMapping *curfalloff;
1001 char defgrp_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
1003 float falloff_radius;
1004 char flag; /* not used yet */
1009 #define MOD_WARP_VOLUME_PRESERVE 1
1012 eWarp_Falloff_None = 0,
1013 eWarp_Falloff_Curve = 1,
1014 eWarp_Falloff_Sharp = 2, /* PROP_SHARP */
1015 eWarp_Falloff_Smooth = 3, /* PROP_SMOOTH */
1016 eWarp_Falloff_Root = 4, /* PROP_ROOT */
1017 eWarp_Falloff_Linear = 5, /* PROP_LIN */
1018 eWarp_Falloff_Const = 6, /* PROP_CONST */
1019 eWarp_Falloff_Sphere = 7, /* PROP_SPHERE */
1020 eWarp_Falloff_InvSquare = 8, /* PROP_INVSQUARE */
1021 /* PROP_RANDOM not used */
1022 } WarpModifierFalloff;
1024 typedef struct WeightVGEditModifierData {
1025 ModifierData modifier;
1027 char defgrp_name[64]; /* Name of vertex group to edit. MAX_VGROUP_NAME. */
1029 short edit_flags; /* Using MOD_WVG_EDIT_* flags. */
1030 short falloff_type; /* Using MOD_WVG_MAPPING_* defines. */
1031 float default_weight; /* Weight for vertices not in vgroup. */
1033 /* Mapping stuff. */
1034 struct CurveMapping *cmap_curve; /* The custom mapping curve! */
1036 /* The add/remove vertices weight thresholds. */
1037 float add_threshold, rem_threshold;
1039 /* Masking options. */
1040 float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
1041 char mask_defgrp_name[64]; /* Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME */
1043 /* Texture masking. */
1044 int mask_tex_use_channel; /* Which channel to use as weightf. */
1045 struct Tex *mask_texture; /* The texture. */
1046 struct Object *mask_tex_map_obj; /* Name of the map object. */
1047 int mask_tex_mapping; /* How to map the texture (using MOD_DISP_MAP_* enums). */
1048 char mask_tex_uvlayer_name[64]; /* Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME */
1052 } WeightVGEditModifierData;
1054 /* WeightVGEdit flags. */
1056 /* (1 << 0), (1 << 1) and (1 << 2) are free for future use! */
1057 MOD_WVG_EDIT_ADD2VG = (1 << 3), /* Add vertices with higher weight than threshold to vgroup. */
1058 MOD_WVG_EDIT_REMFVG = (1 << 4), /* Remove vertices with lower weight than threshold from vgroup. */
1061 typedef struct WeightVGMixModifierData {
1062 ModifierData modifier;
1064 char defgrp_name_a[64]; /* Name of vertex group to modify/weight. MAX_VGROUP_NAME. */
1065 char defgrp_name_b[64]; /* Name of other vertex group to mix in. MAX_VGROUP_NAME. */
1066 float default_weight_a; /* Default weight value for first vgroup. */
1067 float default_weight_b; /* Default weight value to mix in. */
1068 char mix_mode; /* How second vgroups weights affect first ones */
1069 char mix_set; /* What vertices to affect. */
1073 /* Masking options. */
1074 float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
1075 char mask_defgrp_name[64]; /* Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME */
1077 /* Texture masking. */
1078 int mask_tex_use_channel; /* Which channel to use as weightf. */
1079 struct Tex *mask_texture; /* The texture. */
1080 struct Object *mask_tex_map_obj; /* Name of the map object. */
1081 int mask_tex_mapping; /* How to map the texture! */
1082 char mask_tex_uvlayer_name[64]; /* Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME. */
1086 } WeightVGMixModifierData;
1088 /* How second vgroup's weights affect first ones. */
1090 MOD_WVG_MIX_SET = 1, /* Second weights replace weights. */
1091 MOD_WVG_MIX_ADD = 2, /* Second weights are added to weights. */
1092 MOD_WVG_MIX_SUB = 3, /* Second weights are subtracted from weights. */
1093 MOD_WVG_MIX_MUL = 4, /* Second weights are multiplied with weights. */
1094 MOD_WVG_MIX_DIV = 5, /* Second weights divide weights. */
1095 MOD_WVG_MIX_DIF = 6, /* Difference between second weights and weights. */
1096 MOD_WVG_MIX_AVG = 7, /* Average of both weights. */
1099 /* What vertices to affect. */
1101 MOD_WVG_SET_ALL = 1, /* Affect all vertices. */
1102 MOD_WVG_SET_A = 2, /* Affect only vertices in first vgroup. */
1103 MOD_WVG_SET_B = 3, /* Affect only vertices in second vgroup. */
1104 MOD_WVG_SET_OR = 4, /* Affect only vertices in one vgroup or the other. */
1105 MOD_WVG_SET_AND = 5, /* Affect only vertices in both vgroups. */
1108 typedef struct WeightVGProximityModifierData {
1109 ModifierData modifier;
1111 char defgrp_name[64]; /* Name of vertex group to modify/weight. MAX_VGROUP_NAME. */
1113 /* Proximity modes. */
1115 int proximity_flags;
1117 /* Target object from which to calculate vertices distances. */
1118 struct Object *proximity_ob_target;
1120 /* Masking options. */
1121 float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
1122 char mask_defgrp_name[64]; /* Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME */
1124 /* Texture masking. */
1125 int mask_tex_use_channel; /* Which channel to use as weightf. */
1126 struct Tex *mask_texture; /* The texture. */
1127 struct Object *mask_tex_map_obj; /* Name of the map object. */
1128 int mask_tex_mapping; /* How to map the texture! */
1129 char mask_tex_uvlayer_name[64]; /* Name of the UV Map. MAX_CUSTOMDATA_LAYER_NAME. */
1131 float min_dist, max_dist; /* Distances mapping to 0.0/1.0 weights. */
1133 /* Put here to avoid breaking existing struct... */
1134 short falloff_type; /* Using MOD_WVG_MAPPING_* enums. */
1138 } WeightVGProximityModifierData;
1140 /* Modes of proximity weighting. */
1142 MOD_WVG_PROXIMITY_OBJECT = 1, /* source vertex to other location */
1143 MOD_WVG_PROXIMITY_GEOMETRY = 2, /* source vertex to other geometry */
1146 /* Flags options for proximity weighting. */
1148 /* Use nearest vertices of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
1149 MOD_WVG_PROXIMITY_GEOM_VERTS = (1 << 0),
1150 /* Use nearest edges of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
1151 MOD_WVG_PROXIMITY_GEOM_EDGES = (1 << 1),
1152 /* Use nearest faces of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
1153 MOD_WVG_PROXIMITY_GEOM_FACES = (1 << 2),
1156 /* Defines common to all WeightVG modifiers. */
1157 /* Mapping modes. */
1159 MOD_WVG_MAPPING_NONE = 0,
1160 MOD_WVG_MAPPING_CURVE = 1,
1161 MOD_WVG_MAPPING_SHARP = 2, /* PROP_SHARP */
1162 MOD_WVG_MAPPING_SMOOTH = 3, /* PROP_SMOOTH */
1163 MOD_WVG_MAPPING_ROOT = 4, /* PROP_ROOT */
1164 /* PROP_LIN not used (same as NONE, here...). */
1165 /* PROP_CONST not used. */
1166 MOD_WVG_MAPPING_SPHERE = 7, /* PROP_SPHERE */
1167 MOD_WVG_MAPPING_RANDOM = 8, /* PROP_RANDOM */
1168 MOD_WVG_MAPPING_STEP = 9, /* Median Step. */
1171 /* Tex channel to be used as mask. */
1173 MOD_WVG_MASK_TEX_USE_INT = 1,
1174 MOD_WVG_MASK_TEX_USE_RED = 2,
1175 MOD_WVG_MASK_TEX_USE_GREEN = 3,
1176 MOD_WVG_MASK_TEX_USE_BLUE = 4,
1177 MOD_WVG_MASK_TEX_USE_HUE = 5,
1178 MOD_WVG_MASK_TEX_USE_SAT = 6,
1179 MOD_WVG_MASK_TEX_USE_VAL = 7,
1180 MOD_WVG_MASK_TEX_USE_ALPHA = 8,
1183 typedef struct DynamicPaintModifierData {
1184 ModifierData modifier;
1186 struct DynamicPaintCanvasSettings *canvas;
1187 struct DynamicPaintBrushSettings *brush;
1188 int type; /* ui display: canvas / brush */
1190 } DynamicPaintModifierData;
1192 /* Dynamic paint modifier flags */
1194 MOD_DYNAMICPAINT_TYPE_CANVAS = (1 << 0),
1195 MOD_DYNAMICPAINT_TYPE_BRUSH = (1 << 1),
1198 /* Remesh modifier */
1199 typedef enum RemeshModifierFlags {
1200 MOD_REMESH_FLOOD_FILL = 1,
1201 MOD_REMESH_SMOOTH_SHADING = 2,
1202 } RemeshModifierFlags;
1204 typedef enum RemeshModifierMode {
1206 MOD_REMESH_CENTROID = 0,
1208 MOD_REMESH_MASS_POINT = 1,
1209 /* keeps sharp edges */
1210 MOD_REMESH_SHARP_FEATURES = 2,
1211 } RemeshModifierMode;
1213 typedef struct RemeshModifierData {
1214 ModifierData modifier;
1216 /* floodfill option, controls how small components can be before they are removed */
1219 /* ratio between size of model and grid */
1230 } RemeshModifierData;
1233 typedef struct SkinModifierData {
1234 ModifierData modifier;
1236 float branch_smoothing;
1245 /* SkinModifierData.symmetry_axes */
1247 MOD_SKIN_SYMM_X = (1 << 0),
1248 MOD_SKIN_SYMM_Y = (1 << 1),
1249 MOD_SKIN_SYMM_Z = (1 << 2),
1252 /* SkinModifierData.flag */
1254 MOD_SKIN_SMOOTH_SHADING = 1,
1257 /* Triangulate modifier */
1258 typedef struct TriangulateModifierData {
1259 ModifierData modifier;
1265 } TriangulateModifierData;
1267 #ifdef DNA_DEPRECATED
1269 MOD_TRIANGULATE_BEAUTY = (1 << 0), /* deprecated */
1273 /* Triangulate methods - NGons */
1275 MOD_TRIANGULATE_NGON_BEAUTY = 0,
1276 MOD_TRIANGULATE_NGON_EARCLIP,
1279 /* Triangulate methods - Quads */
1281 MOD_TRIANGULATE_QUAD_BEAUTY = 0,
1282 MOD_TRIANGULATE_QUAD_FIXED,
1283 MOD_TRIANGULATE_QUAD_ALTERNATE,
1284 MOD_TRIANGULATE_QUAD_SHORTEDGE
1287 typedef struct LaplacianSmoothModifierData {
1288 ModifierData modifier;
1290 float lambda, lambda_border, pad1;
1291 char defgrp_name[64]; /* MAX_VGROUP_NAME */
1293 } LaplacianSmoothModifierData;
1295 /* Smooth modifier flags */
1297 MOD_LAPLACIANSMOOTH_X = (1 << 1),
1298 MOD_LAPLACIANSMOOTH_Y = (1 << 2),
1299 MOD_LAPLACIANSMOOTH_Z = (1 << 3),
1300 MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME = (1 << 4),
1301 MOD_LAPLACIANSMOOTH_NORMALIZED = (1 << 5),
1305 typedef struct CorrectiveSmoothModifierData {
1306 ModifierData modifier;
1308 /* positions set during 'bind' operator
1309 * use for MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND */
1310 float (*bind_coords)[3];
1312 /* note: -1 is used to bind */
1313 unsigned int bind_coords_num;
1317 char smooth_type, rest_source;
1320 char defgrp_name[64]; /* MAX_VGROUP_NAME */
1322 /* runtime-only cache (delta's between),
1323 * delta's between the original positions and the smoothed positions */
1324 float (*delta_cache)[3];
1325 unsigned int delta_cache_num;
1327 } CorrectiveSmoothModifierData;
1330 MOD_CORRECTIVESMOOTH_SMOOTH_SIMPLE = 0,
1331 MOD_CORRECTIVESMOOTH_SMOOTH_LENGTH_WEIGHT = 1,
1335 MOD_CORRECTIVESMOOTH_RESTSOURCE_ORCO = 0,
1336 MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND = 1,
1339 /* Corrective Smooth modifier flags */
1341 MOD_CORRECTIVESMOOTH_INVERT_VGROUP = (1 << 0),
1342 MOD_CORRECTIVESMOOTH_ONLY_SMOOTH = (1 << 1),
1343 MOD_CORRECTIVESMOOTH_PIN_BOUNDARY = (1 << 2),
1346 typedef struct UVWarpModifierData {
1347 ModifierData modifier;
1349 char axis_u, axis_v;
1351 float center[2]; /* used for rotate/scale */
1353 struct Object *object_src; /* source */
1354 char bone_src[64]; /* optional name of bone target, MAX_ID_NAME-2 */
1355 struct Object *object_dst; /* target */
1356 char bone_dst[64]; /* optional name of bone target, MAX_ID_NAME-2 */
1358 char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
1359 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
1360 } UVWarpModifierData;
1362 /* cache modifier */
1363 typedef struct MeshCacheModifierData {
1364 ModifierData modifier;
1367 char type; /* file format */
1371 /* axis conversion */
1382 /* play_mode == MOD_MESHCACHE_PLAY_CFEA */
1386 /* play_mode == MOD_MESHCACHE_PLAY_EVAL */
1387 /* we could use one float for all these but their purpose is very different */
1392 char filepath[1024]; /* FILE_MAX */
1393 } MeshCacheModifierData;
1396 MOD_MESHCACHE_TYPE_MDD = 1,
1397 MOD_MESHCACHE_TYPE_PC2 = 2,
1401 MOD_MESHCACHE_DEFORM_OVERWRITE = 0,
1402 MOD_MESHCACHE_DEFORM_INTEGRATE = 1,
1406 MOD_MESHCACHE_INTERP_NONE = 0,
1407 MOD_MESHCACHE_INTERP_LINEAR = 1,
1408 /* MOD_MESHCACHE_INTERP_CARDINAL = 2, */
1412 MOD_MESHCACHE_TIME_FRAME = 0,
1413 MOD_MESHCACHE_TIME_SECONDS = 1,
1414 MOD_MESHCACHE_TIME_FACTOR = 2,
1418 MOD_MESHCACHE_PLAY_CFEA = 0,
1419 MOD_MESHCACHE_PLAY_EVAL = 1,
1423 typedef struct LaplacianDeformModifierData {
1424 ModifierData modifier;
1425 char anchor_grp_name[64]; /* MAX_VGROUP_NAME */
1426 int total_verts, repeat;
1428 void *cache_system; /* runtime only */
1431 } LaplacianDeformModifierData;
1433 /* Smooth modifier flags */
1435 MOD_LAPLACIANDEFORM_BIND = 1,
1438 /* many of these options match 'solidify' */
1439 typedef struct WireframeModifierData {
1440 ModifierData modifier;
1441 char defgrp_name[64]; /* MAX_VGROUP_NAME */
1444 float offset_fac_vg;
1445 float crease_weight;
1446 short flag, mat_ofs;
1448 } WireframeModifierData;
1451 MOD_WIREFRAME_INVERT_VGROUP = (1 << 0),
1452 MOD_WIREFRAME_REPLACE = (1 << 1),
1453 MOD_WIREFRAME_BOUNDARY = (1 << 2),
1454 MOD_WIREFRAME_OFS_EVEN = (1 << 3),
1455 MOD_WIREFRAME_OFS_RELATIVE = (1 << 4),
1456 MOD_WIREFRAME_CREASE = (1 << 5),
1460 typedef struct DataTransferModifierData {
1461 ModifierData modifier;
1463 struct Object *ob_source;
1465 int data_types; /* See DT_TYPE_ enum in ED_object.h */
1467 /* See MREMAP_MODE_ enum in BKE_mesh_mapping.h */
1473 float map_max_distance;
1474 float map_ray_radius;
1475 float islands_precision;
1479 int layers_select_src[4]; /* DT_MULTILAYER_INDEX_MAX; See DT_FROMLAYERS_ enum in ED_object.h */
1480 int layers_select_dst[4]; /* DT_MULTILAYER_INDEX_MAX; See DT_TOLAYERS_ enum in ED_object.h */
1482 int mix_mode; /* See CDT_MIX_ enum in BKE_customdata.h */
1484 char defgrp_name[64]; /* MAX_VGROUP_NAME */
1487 } DataTransferModifierData;
1489 /* DataTransferModifierData.flags */
1491 MOD_DATATRANSFER_OBSRC_TRANSFORM = 1 << 0,
1492 MOD_DATATRANSFER_MAP_MAXDIST = 1 << 1,
1493 MOD_DATATRANSFER_INVERT_VGROUP = 1 << 2,
1495 /* Only for UI really. */
1496 MOD_DATATRANSFER_USE_VERT = 1 << 28,
1497 MOD_DATATRANSFER_USE_EDGE = 1 << 29,
1498 MOD_DATATRANSFER_USE_LOOP = 1 << 30,
1499 MOD_DATATRANSFER_USE_POLY = 1 << 31,
1502 /* Set Split Normals modifier */
1503 typedef struct NormalEditModifierData {
1504 ModifierData modifier;
1505 char defgrp_name[64]; /* MAX_VGROUP_NAME */
1506 struct Object *target; /* Source of normals, or center of ellipsoid. */
1513 } NormalEditModifierData;
1515 /* NormalEditModifierData.mode */
1517 MOD_NORMALEDIT_MODE_RADIAL = 0,
1518 MOD_NORMALEDIT_MODE_DIRECTIONAL = 1,
1521 /* NormalEditModifierData.flags */
1523 MOD_NORMALEDIT_INVERT_VGROUP = (1 << 0),
1524 MOD_NORMALEDIT_USE_DIRECTION_PARALLEL = (1 << 1),
1527 /* NormalEditModifierData.mix_mode */
1529 MOD_NORMALEDIT_MIX_COPY = 0,
1530 MOD_NORMALEDIT_MIX_ADD = 1,
1531 MOD_NORMALEDIT_MIX_SUB = 2,
1532 MOD_NORMALEDIT_MIX_MUL = 3,
1535 #endif /* __DNA_MODIFIER_TYPES_H__ */