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,*/ /* DEPRECATED */
56 /*eModifierType_ParticleInstance = 20,*/ /* DEPRECATED */
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,
88 eModifierType_MeshSequenceCache = 52,
92 typedef enum ModifierMode {
93 eModifierMode_Realtime = (1 << 0),
94 eModifierMode_Render = (1 << 1),
95 eModifierMode_Editmode = (1 << 2),
96 eModifierMode_OnCage = (1 << 3),
97 eModifierMode_Expanded = (1 << 4),
98 eModifierMode_Virtual = (1 << 5),
99 eModifierMode_ApplyOnSpline = (1 << 6),
100 eModifierMode_DisableTemporary = (1 << 31)
103 typedef struct ModifierData {
104 struct ModifierData *next, *prev;
108 char name[64]; /* MAX_NAME */
110 /* XXX for timing info set by caller... solve later? (ton) */
117 eSubsurfModifierFlag_Incremental = (1 << 0),
118 eSubsurfModifierFlag_DebugIncr = (1 << 1),
119 eSubsurfModifierFlag_ControlEdges = (1 << 2),
120 eSubsurfModifierFlag_SubsurfUv = (1 << 3),
121 } SubsurfModifierFlag;
123 /* not a real modifier */
124 typedef struct MappingInfoModifierData {
125 ModifierData modifier;
128 struct Object *map_object;
129 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
132 } MappingInfoModifierData;
134 typedef struct SubsurfModifierData {
135 ModifierData modifier;
137 short subdivType, levels, renderLevels, flags;
138 short use_opensubdiv, pad[3];
140 void *emCache, *mCache;
141 } SubsurfModifierData;
143 typedef struct LatticeModifierData {
144 ModifierData modifier;
146 struct Object *object;
147 char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
150 } LatticeModifierData;
152 typedef struct CurveModifierData {
153 ModifierData modifier;
155 struct Object *object;
156 char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
157 short defaxis; /* axis along which curve deforms */
161 /* CurveModifierData->defaxis */
171 typedef struct BuildModifierData {
172 ModifierData modifier;
177 short randomize; /* (bool) whether order of vertices is randomized - legacy files (for readfile conversion) */
178 int seed; /* (int) random seed */
181 /* Build Modifier -> flag */
183 MOD_BUILD_FLAG_RANDOMIZE = (1 << 0), /* order of vertices is randomized */
184 MOD_BUILD_FLAG_REVERSE = (1 << 1), /* frame range is reversed, resulting in a deconstruction effect */
188 typedef struct MaskModifierData {
189 ModifierData modifier;
191 struct Object *ob_arm; /* armature to use to in place of hardcoded vgroup */
192 char vgroup[64]; /* name of vertex group to use to mask, MAX_VGROUP_NAME */
194 int mode; /* using armature or hardcoded vgroup */
195 int flag; /* flags for various things */
198 /* Mask Modifier -> mode */
200 MOD_MASK_MODE_VGROUP = 0,
201 MOD_MASK_MODE_ARM = 1,
204 /* Mask Modifier -> flag */
206 MOD_MASK_INV = (1 << 0),
209 typedef struct ArrayModifierData {
210 ModifierData modifier;
212 /* the object with which to cap the start of the array */
213 struct Object *start_cap;
214 /* the object with which to cap the end of the array */
215 struct Object *end_cap;
216 /* the curve object to use for MOD_ARR_FITCURVE */
217 struct Object *curve_ob;
218 /* the object to use for object offset */
219 struct Object *offset_ob;
220 /* a constant duplicate offset;
221 * 1 means the duplicates are 1 unit apart
224 /* a scaled factor for duplicate offsets;
225 * 1 means the duplicates are 1 object-width apart
228 /* the length over which to distribute the duplicates */
230 /* the limit below which to merge vertices in adjacent duplicates */
232 /* determines how duplicate count is calculated; one of:
233 * - MOD_ARR_FIXEDCOUNT -> fixed
234 * - MOD_ARR_FITLENGTH -> calculated to fit a set length
235 * - MOD_ARR_FITCURVE -> calculated to fit the length of a Curve object
238 /* flags specifying how total offset is calculated; binary OR of:
239 * - MOD_ARR_OFF_CONST -> total offset += offset
240 * - MOD_ARR_OFF_RELATIVE -> total offset += relative * object width
241 * - MOD_ARR_OFF_OBJ -> total offset += offset_ob's matrix
242 * total offset is the sum of the individual enabled offsets
246 * MOD_ARR_MERGE -> merge vertices in adjacent duplicates
249 /* the number of duplicates to generate for MOD_ARR_FIXEDCOUNT */
253 /* ArrayModifierData->fit_type */
255 MOD_ARR_FIXEDCOUNT = 0,
256 MOD_ARR_FITLENGTH = 1,
257 MOD_ARR_FITCURVE = 2,
260 /* ArrayModifierData->offset_type */
262 MOD_ARR_OFF_CONST = (1 << 0),
263 MOD_ARR_OFF_RELATIVE = (1 << 1),
264 MOD_ARR_OFF_OBJ = (1 << 2),
267 /* ArrayModifierData->flags */
269 MOD_ARR_MERGE = (1 << 0),
270 MOD_ARR_MERGEFINAL = (1 << 1),
273 typedef struct MirrorModifierData {
274 ModifierData modifier;
276 short axis DNA_DEPRECATED; /* deprecated, use flag instead */
279 struct Object *mirror_ob;
280 } MirrorModifierData;
282 /* MirrorModifierData->flag */
284 MOD_MIR_CLIPPING = (1 << 0),
285 MOD_MIR_MIRROR_U = (1 << 1),
286 MOD_MIR_MIRROR_V = (1 << 2),
287 MOD_MIR_AXIS_X = (1 << 3),
288 MOD_MIR_AXIS_Y = (1 << 4),
289 MOD_MIR_AXIS_Z = (1 << 5),
290 MOD_MIR_VGROUP = (1 << 6),
291 MOD_MIR_NO_MERGE = (1 << 7),
294 typedef struct EdgeSplitModifierData {
295 ModifierData modifier;
297 float split_angle; /* angle above which edges should be split */
299 } EdgeSplitModifierData;
301 /* EdgeSplitModifierData->flags */
303 MOD_EDGESPLIT_FROMANGLE = (1 << 1),
304 MOD_EDGESPLIT_FROMFLAG = (1 << 2),
307 typedef struct BevelModifierData {
308 ModifierData modifier;
310 float value; /* the "raw" bevel value (distance/amount to bevel) */
311 int res; /* the resolution (as originally coded, it is the number of recursive bevels) */
312 short flags; /* general option flags */
313 short val_flags; /* used to interpret the bevel value */
314 short lim_flags; /* flags to tell the tool how to limit the bevel */
315 short e_flags; /* flags to direct how edge weights are applied to verts */
316 short mat; /* material index if >= 0, else material inherited from surrounding faces */
319 float profile; /* controls profile shape (0->1, .5 is round) */
320 /* if the MOD_BEVEL_ANGLE is set, this will be how "sharp" an edge must be before it gets beveled */
322 /* if the MOD_BEVEL_VWEIGHT option is set, this will be the name of the vert group, MAX_VGROUP_NAME */
323 char defgrp_name[64];
326 /* BevelModifierData->flags and BevelModifierData->lim_flags */
328 MOD_BEVEL_VERT = (1 << 1),
329 /* MOD_BEVEL_RADIUS = (1 << 2), */
330 MOD_BEVEL_ANGLE = (1 << 3),
331 MOD_BEVEL_WEIGHT = (1 << 4),
332 MOD_BEVEL_VGROUP = (1 << 5),
333 MOD_BEVEL_EMIN = (1 << 7),
334 MOD_BEVEL_EMAX = (1 << 8),
335 /* MOD_BEVEL_RUNNING = (1 << 9), */
336 /* MOD_BEVEL_RES = (1 << 10), */
337 /* This is a new setting not related to old (trunk bmesh bevel code)
338 * but adding here because they are mixed - campbell
340 /* MOD_BEVEL_EVEN = (1 << 11), */
341 /* MOD_BEVEL_DIST = (1 << 12), */ /* same as above */
342 MOD_BEVEL_OVERLAP_OK = (1 << 13),
343 MOD_BEVEL_EVEN_WIDTHS = (1 << 14),
346 /* BevelModifierData->val_flags (not used as flags any more) */
348 MOD_BEVEL_AMT_OFFSET = 0,
349 MOD_BEVEL_AMT_WIDTH = 1,
350 MOD_BEVEL_AMT_DEPTH = 2,
351 MOD_BEVEL_AMT_PERCENT = 3,
354 typedef struct SmokeModifierData {
355 ModifierData modifier;
357 struct SmokeDomainSettings *domain;
358 struct SmokeFlowSettings *flow; /* inflow, outflow, smoke objects */
359 struct SmokeCollSettings *coll; /* collision objects */
361 int type; /* domain, inflow, outflow, ... */
364 /* Smoke modifier flags */
366 MOD_SMOKE_TYPE_DOMAIN = (1 << 0),
367 MOD_SMOKE_TYPE_FLOW = (1 << 1),
368 MOD_SMOKE_TYPE_COLL = (1 << 2),
371 typedef struct DisplaceModifierData {
372 ModifierData modifier;
374 /* keep in sync with MappingInfoModifierData */
376 struct Object *map_object;
377 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
380 /* end MappingInfoModifierData */
384 char defgrp_name[64]; /* MAX_VGROUP_NAME */
387 } DisplaceModifierData;
389 /* DisplaceModifierData->direction */
394 MOD_DISP_DIR_NOR = 3,
395 MOD_DISP_DIR_RGB_XYZ = 4,
396 MOD_DISP_DIR_CLNOR = 5,
399 /* DisplaceModifierData->texmapping */
401 MOD_DISP_MAP_LOCAL = 0,
402 MOD_DISP_MAP_GLOBAL = 1,
403 MOD_DISP_MAP_OBJECT = 2,
407 /* DisplaceModifierData->space */
409 MOD_DISP_SPACE_LOCAL = 0,
410 MOD_DISP_SPACE_GLOBAL = 1,
413 typedef struct UVProjectModifierData {
414 ModifierData modifier;
416 /* the objects which do the projecting */
417 struct Object *projectors[10]; /* MOD_UVPROJECT_MAXPROJECTORS */
418 struct Image *image; /* the image to project */
421 float aspectx, aspecty;
422 float scalex, scaley;
423 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
424 int uvlayer_tmp, pad;
425 } UVProjectModifierData;
427 #define MOD_UVPROJECT_MAXPROJECTORS 10
429 /* UVProjectModifierData->flags */
431 MOD_UVPROJECT_OVERRIDEIMAGE = (1 << 0),
434 typedef struct DecimateModifierData {
435 ModifierData modifier;
437 float percent; /* (mode == MOD_DECIM_MODE_COLLAPSE) */
438 short iter; /* (mode == MOD_DECIM_MODE_UNSUBDIV) */
439 char delimit; /* (mode == MOD_DECIM_MODE_DISSOLVE) */
440 char symmetry_axis; /* (mode == MOD_DECIM_MODE_COLLAPSE) */
441 float angle; /* (mode == MOD_DECIM_MODE_DISSOLVE) */
443 char defgrp_name[64]; /* MAX_VGROUP_NAME */
449 } DecimateModifierData;
452 MOD_DECIM_FLAG_INVERT_VGROUP = (1 << 0),
453 MOD_DECIM_FLAG_TRIANGULATE = (1 << 1), /* for collapse only. dont convert tri pairs back to quads */
454 MOD_DECIM_FLAG_ALL_BOUNDARY_VERTS = (1 << 2), /* for dissolve only. collapse all verts between 2 faces */
455 MOD_DECIM_FLAG_SYMMETRY = (1 << 3),
459 MOD_DECIM_MODE_COLLAPSE,
460 MOD_DECIM_MODE_UNSUBDIV,
461 MOD_DECIM_MODE_DISSOLVE, /* called planar in the UI */
464 typedef struct SmoothModifierData {
465 ModifierData modifier;
467 char defgrp_name[64]; /* MAX_VGROUP_NAME */
470 } SmoothModifierData;
472 /* Smooth modifier flags */
474 MOD_SMOOTH_X = (1 << 1),
475 MOD_SMOOTH_Y = (1 << 2),
476 MOD_SMOOTH_Z = (1 << 3),
479 typedef struct CastModifierData {
480 ModifierData modifier;
482 struct Object *object;
486 char defgrp_name[64]; /* MAX_VGROUP_NAME */
490 /* Cast modifier flags */
492 /* And what bout (1 << 0) flag? ;) */
493 MOD_CAST_X = (1 << 1),
494 MOD_CAST_Y = (1 << 2),
495 MOD_CAST_Z = (1 << 3),
496 MOD_CAST_USE_OB_TRANSFORM = (1 << 4),
497 MOD_CAST_SIZE_FROM_RADIUS = (1 << 5),
500 /* Cast modifier projection types */
502 MOD_CAST_TYPE_SPHERE = 0,
503 MOD_CAST_TYPE_CYLINDER = 1,
504 MOD_CAST_TYPE_CUBOID = 2,
507 typedef struct WaveModifierData {
508 ModifierData modifier;
510 /* keep in sync with MappingInfoModifierData */
512 struct Object *map_object;
513 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
516 /* end MappingInfoModifierData */
518 struct Object *objectcenter;
519 char defgrp_name[64]; /* MAX_VGROUP_NAME */
523 float startx, starty, height, width;
524 float narrow, speed, damp, falloff;
526 float timeoffs, lifetime;
530 /* WaveModifierData.flag */
532 /* And what bout (1 << 0) flag? ;) */
533 MOD_WAVE_X = (1 << 1),
534 MOD_WAVE_Y = (1 << 2),
535 MOD_WAVE_CYCL = (1 << 3),
536 MOD_WAVE_NORM = (1 << 4),
537 MOD_WAVE_NORM_X = (1 << 5),
538 MOD_WAVE_NORM_Y = (1 << 6),
539 MOD_WAVE_NORM_Z = (1 << 7),
542 typedef struct ArmatureModifierData {
543 ModifierData modifier;
545 short deformflag, multi; /* deformflag replaces armature->deformflag */
547 struct Object *object;
548 float *prevCos; /* stored input of previous modifier, for vertexgroup blending */
549 char defgrp_name[64]; /* MAX_VGROUP_NAME */
550 } ArmatureModifierData;
553 MOD_HOOK_UNIFORM_SPACE = (1 << 0),
556 /* same as WarpModifierFalloff */
558 eHook_Falloff_None = 0,
559 eHook_Falloff_Curve = 1,
560 eHook_Falloff_Sharp = 2, /* PROP_SHARP */
561 eHook_Falloff_Smooth = 3, /* PROP_SMOOTH */
562 eHook_Falloff_Root = 4, /* PROP_ROOT */
563 eHook_Falloff_Linear = 5, /* PROP_LIN */
564 eHook_Falloff_Const = 6, /* PROP_CONST */
565 eHook_Falloff_Sphere = 7, /* PROP_SPHERE */
566 eHook_Falloff_InvSquare = 8, /* PROP_INVSQUARE */
567 /* PROP_RANDOM not used */
568 } HookModifierFalloff;
570 typedef struct HookModifierData {
571 ModifierData modifier;
573 struct Object *object;
574 char subtarget[64]; /* optional name of bone target, MAX_ID_NAME-2 */
577 char falloff_type; /* use enums from WarpModifier (exact same functionality) */
579 float parentinv[4][4]; /* matrix making current transform unmodified */
580 float cent[3]; /* visualization of hook */
581 float falloff; /* if not zero, falloff is distance where influence zero */
583 struct CurveMapping *curfalloff;
585 int *indexar; /* if NULL, it's using vertexgroup */
588 char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
591 typedef struct SoftbodyModifierData {
592 ModifierData modifier;
593 } SoftbodyModifierData;
595 typedef struct ClothModifierData {
596 ModifierData modifier;
598 struct Scene *scene; /* the context, time etc is here */
599 struct Cloth *clothObject; /* The internal data structure for cloth. */
600 struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.h */
601 struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_types.h */
602 /* XXX nasty hack, remove once hair can be separated from cloth modifier data */
603 struct ClothHairData *hairdata;
604 /* grid geometry values of hair continuum */
605 float hair_grid_min[3];
606 float hair_grid_max[3];
607 int hair_grid_res[3];
608 float hair_grid_cellsize;
610 struct ClothSolverResult *solver_result;
613 typedef struct CollisionModifierData {
614 ModifierData modifier;
616 struct MVert *x; /* position at the beginning of the frame */
617 struct MVert *xnew; /* position at the end of the frame */
618 struct MVert *xold; /* unused atm, but was discussed during sprint */
619 struct MVert *current_xnew; /* new position at the actual inter-frame step */
620 struct MVert *current_x; /* position at the actual inter-frame step */
621 struct MVert *current_v; /* (xnew - x) at the actual inter-frame step */
623 struct MVertTri *tri;
625 unsigned int mvert_num;
626 unsigned int tri_num;
627 float time_x, time_xnew; /* cfra time of modifier */
628 char is_static; /* collider doesn't move this frame, i.e. x[].co==xnew[].co */
631 struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */
632 } CollisionModifierData;
634 typedef struct SurfaceModifierData {
635 ModifierData modifier;
637 struct MVert *x; /* old position */
638 struct MVert *v; /* velocity */
640 struct DerivedMesh *dm;
642 struct BVHTreeFromMesh *bvhtree; /* bounding volume hierarchy of the mesh faces */
645 } SurfaceModifierData;
647 typedef struct BooleanModifierData {
648 ModifierData modifier;
650 struct Object *object;
654 float double_threshold;
655 } BooleanModifierData;
658 eBooleanModifierOp_Intersect = 0,
659 eBooleanModifierOp_Union = 1,
660 eBooleanModifierOp_Difference = 2,
664 eBooleanModifierSolver_Carve = 0,
665 eBooleanModifierSolver_BMesh = 1,
668 typedef struct MDefInfluence {
673 typedef struct MDefCell {
678 typedef struct MeshDeformModifierData {
679 ModifierData modifier;
681 struct Object *object; /* mesh object */
682 char defgrp_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
684 short gridsize, flag, pad[2];
686 /* result of static binding */
687 MDefInfluence *bindinfluences; /* influences */
688 int *bindoffsets; /* offsets into influences array */
689 float *bindcagecos; /* coordinates that cage was bound with */
690 int totvert, totcagevert; /* total vertices in mesh and cage */
692 /* result of dynamic binding */
693 MDefCell *dyngrid; /* grid with dynamic binding cell points */
694 MDefInfluence *dyninfluences; /* dynamic binding vertex influences */
695 int *dynverts; /* is this vertex bound or not? */
696 int dyngridsize; /* size of the dynamic bind grid */
697 int totinfluence; /* total number of vertex influences */
698 float dyncellmin[3]; /* offset of the dynamic bind grid */
699 float dyncellwidth; /* width of dynamic bind cell */
700 float bindmat[4][4]; /* matrix of cage at binding time */
702 /* deprecated storage */
703 float *bindweights; /* deprecated inefficient storage */
704 float *bindcos; /* deprecated storage of cage coords */
707 void (*bindfunc)(struct Scene *scene, struct MeshDeformModifierData *mmd, struct DerivedMesh *cagedm,
708 float *vertexcos, int totvert, float cagemat[4][4]);
709 } MeshDeformModifierData;
712 MOD_MDEF_INVERT_VGROUP = (1 << 0),
713 MOD_MDEF_DYNAMIC_BIND = (1 << 1),
718 MOD_MDEF_SURFACE = 1,
722 eExplodeFlag_CalcFaces = (1 << 0),
723 eExplodeFlag_PaSize = (1 << 1),
724 eExplodeFlag_EdgeCut = (1 << 2),
725 eExplodeFlag_Unborn = (1 << 3),
726 eExplodeFlag_Alive = (1 << 4),
727 eExplodeFlag_Dead = (1 << 5),
728 } ExplodeModifierFlag;
730 typedef struct ExplodeModifierData {
731 ModifierData modifier;
736 char uvname[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
737 } ExplodeModifierData;
739 typedef struct MultiresModifierData {
740 ModifierData modifier;
742 char lvl, sculptlvl, renderlvl, totlvl;
743 char simple, flags, pad[2];
744 } MultiresModifierData;
747 eMultiresModifierFlag_ControlEdges = (1 << 0),
748 eMultiresModifierFlag_PlainUv = (1 << 1),
749 } MultiresModifierFlag;
751 typedef struct FluidsimModifierData {
752 ModifierData modifier;
754 struct FluidsimSettings *fss; /* definition is in DNA_object_fluidsim.h */
755 } FluidsimModifierData;
757 typedef struct ShrinkwrapModifierData {
758 ModifierData modifier;
760 struct Object *target; /* shrink target */
761 struct Object *auxTarget; /* additional shrink target */
762 char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
763 float keepDist; /* distance offset to keep from mesh/projection point */
764 short shrinkType; /* shrink type projection */
765 char shrinkOpts; /* shrink options */
767 float projLimit; /* limit the projection ray cast */
768 char projAxis; /* axis to project over */
770 /* If using projection over vertex normal this controls the level of subsurface that must be done
771 * before getting the vertex coordinates and normal
776 } ShrinkwrapModifierData;
778 /* Shrinkwrap->shrinkType */
780 MOD_SHRINKWRAP_NEAREST_SURFACE = 0,
781 MOD_SHRINKWRAP_PROJECT = 1,
782 MOD_SHRINKWRAP_NEAREST_VERTEX = 2,
785 /* Shrinkwrap->shrinkOpts */
787 /* allow shrinkwrap to move the vertex in the positive direction of axis */
788 MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR = (1 << 0),
789 /* allow shrinkwrap to move the vertex in the negative direction of axis */
790 MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR = (1 << 1),
792 /* ignore vertex moves if a vertex ends projected on a front face of the target */
793 MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE = (1 << 3),
794 /* ignore vertex moves if a vertex ends projected on a back face of the target */
795 MOD_SHRINKWRAP_CULL_TARGET_BACKFACE = (1 << 4),
797 MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE = (1 << 5), /* distance is measure to the front face of the target */
799 MOD_SHRINKWRAP_INVERT_VGROUP = (1 << 6),
802 /* Shrinkwrap->projAxis */
804 MOD_SHRINKWRAP_PROJECT_OVER_NORMAL = 0, /* projection over normal is used if no axis is selected */
805 MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS = (1 << 0),
806 MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS = (1 << 1),
807 MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS = (1 << 2),
811 typedef struct SimpleDeformModifierData {
812 ModifierData modifier;
814 struct Object *origin; /* object to control the origin of modifier space coordinates */
815 char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
816 float factor; /* factors to control simple deforms */
817 float limit[2]; /* lower and upper limit */
819 char mode; /* deform function */
820 char axis; /* lock axis (for taper and strech) */
824 } SimpleDeformModifierData;
826 /* SimpleDeform->flag */
828 MOD_SIMPLEDEFORM_FLAG_INVERT_VGROUP = (1 << 0),
833 MOD_SIMPLEDEFORM_MODE_TWIST = 1,
834 MOD_SIMPLEDEFORM_MODE_BEND = 2,
835 MOD_SIMPLEDEFORM_MODE_TAPER = 3,
836 MOD_SIMPLEDEFORM_MODE_STRETCH = 4,
840 MOD_SIMPLEDEFORM_LOCK_AXIS_X = (1 << 0),
841 MOD_SIMPLEDEFORM_LOCK_AXIS_Y = (1 << 1),
844 typedef struct ShapeKeyModifierData {
845 ModifierData modifier;
846 } ShapeKeyModifierData;
848 typedef struct SolidifyModifierData {
849 ModifierData modifier;
851 char defgrp_name[64]; /* name of vertex group to use, MAX_VGROUP_NAME */
852 float offset; /* new surface offset level*/
853 float offset_fac; /* midpoint of the offset */
854 /* factor for the minimum weight to use when vgroups are used, avoids 0.0 weights giving duplicate geometry */
856 float offset_clamp; /* clamp offset based on surrounding geometry */
864 } SolidifyModifierData;
867 MOD_SOLIDIFY_RIM = (1 << 0),
868 MOD_SOLIDIFY_EVEN = (1 << 1),
869 MOD_SOLIDIFY_NORMAL_CALC = (1 << 2),
870 MOD_SOLIDIFY_VGROUP_INV = (1 << 3),
871 #ifdef DNA_DEPRECATED
872 MOD_SOLIDIFY_RIM_MATERIAL = (1 << 4), /* deprecated, used in do_versions */
874 MOD_SOLIDIFY_FLIP = (1 << 5),
875 MOD_SOLIDIFY_NOSHELL = (1 << 6),
878 typedef struct ScrewModifierData {
879 ModifierData modifier;
881 struct Object *ob_axis;
883 unsigned int render_steps;
893 MOD_SCREW_NORMAL_FLIP = (1 << 0),
894 MOD_SCREW_NORMAL_CALC = (1 << 1),
895 MOD_SCREW_OBJECT_OFFSET = (1 << 2),
896 /* MOD_SCREW_OBJECT_ANGLE = (1 << 4), */
897 MOD_SCREW_SMOOTH_SHADING = (1 << 5),
898 MOD_SCREW_UV_STRETCH_U = (1 << 6),
899 MOD_SCREW_UV_STRETCH_V = (1 << 7),
902 typedef struct OceanModifierData {
903 ModifierData modifier;
906 struct OceanCache *oceancache;
917 float wave_alignment;
918 float wave_direction;
928 char cachepath[1024]; /* FILE_MAX */
929 char foamlayername[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
949 MOD_OCEAN_GEOM_GENERATE = 0,
950 MOD_OCEAN_GEOM_DISPLACE = 1,
951 MOD_OCEAN_GEOM_SIM_ONLY = 2,
955 MOD_OCEAN_REFRESH_RESET = (1 << 0),
956 MOD_OCEAN_REFRESH_SIM = (1 << 1),
957 MOD_OCEAN_REFRESH_ADD = (1 << 2),
958 MOD_OCEAN_REFRESH_CLEAR_CACHE = (1 << 3),
959 MOD_OCEAN_REFRESH_TOPOLOGY = (1 << 4),
963 MOD_OCEAN_GENERATE_FOAM = (1 << 0),
964 MOD_OCEAN_GENERATE_NORMALS = (1 << 1),
967 typedef struct WarpModifierData {
968 ModifierData modifier;
969 /* keep in sync with MappingInfoModifierData */
971 struct Object *map_object;
972 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
975 /* end MappingInfoModifierData */
977 struct Object *object_from;
978 struct Object *object_to;
979 struct CurveMapping *curfalloff;
980 char defgrp_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
982 float falloff_radius;
983 char flag; /* not used yet */
988 #define MOD_WARP_VOLUME_PRESERVE 1
991 eWarp_Falloff_None = 0,
992 eWarp_Falloff_Curve = 1,
993 eWarp_Falloff_Sharp = 2, /* PROP_SHARP */
994 eWarp_Falloff_Smooth = 3, /* PROP_SMOOTH */
995 eWarp_Falloff_Root = 4, /* PROP_ROOT */
996 eWarp_Falloff_Linear = 5, /* PROP_LIN */
997 eWarp_Falloff_Const = 6, /* PROP_CONST */
998 eWarp_Falloff_Sphere = 7, /* PROP_SPHERE */
999 eWarp_Falloff_InvSquare = 8, /* PROP_INVSQUARE */
1000 /* PROP_RANDOM not used */
1001 } WarpModifierFalloff;
1003 typedef struct WeightVGEditModifierData {
1004 ModifierData modifier;
1006 char defgrp_name[64]; /* Name of vertex group to edit. MAX_VGROUP_NAME. */
1008 short edit_flags; /* Using MOD_WVG_EDIT_* flags. */
1009 short falloff_type; /* Using MOD_WVG_MAPPING_* defines. */
1010 float default_weight; /* Weight for vertices not in vgroup. */
1012 /* Mapping stuff. */
1013 struct CurveMapping *cmap_curve; /* The custom mapping curve! */
1015 /* The add/remove vertices weight thresholds. */
1016 float add_threshold, rem_threshold;
1018 /* Masking options. */
1019 float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
1020 char mask_defgrp_name[64]; /* Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME */
1022 /* Texture masking. */
1023 int mask_tex_use_channel; /* Which channel to use as weightf. */
1024 struct Tex *mask_texture; /* The texture. */
1025 struct Object *mask_tex_map_obj; /* Name of the map object. */
1026 int mask_tex_mapping; /* How to map the texture (using MOD_DISP_MAP_* enums). */
1027 char mask_tex_uvlayer_name[64]; /* Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME */
1031 } WeightVGEditModifierData;
1033 /* WeightVGEdit flags. */
1035 /* (1 << 0), (1 << 1) and (1 << 2) are free for future use! */
1036 MOD_WVG_EDIT_ADD2VG = (1 << 3), /* Add vertices with higher weight than threshold to vgroup. */
1037 MOD_WVG_EDIT_REMFVG = (1 << 4), /* Remove vertices with lower weight than threshold from vgroup. */
1040 typedef struct WeightVGMixModifierData {
1041 ModifierData modifier;
1043 char defgrp_name_a[64]; /* Name of vertex group to modify/weight. MAX_VGROUP_NAME. */
1044 char defgrp_name_b[64]; /* Name of other vertex group to mix in. MAX_VGROUP_NAME. */
1045 float default_weight_a; /* Default weight value for first vgroup. */
1046 float default_weight_b; /* Default weight value to mix in. */
1047 char mix_mode; /* How second vgroups weights affect first ones */
1048 char mix_set; /* What vertices to affect. */
1052 /* Masking options. */
1053 float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
1054 char mask_defgrp_name[64]; /* Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME */
1056 /* Texture masking. */
1057 int mask_tex_use_channel; /* Which channel to use as weightf. */
1058 struct Tex *mask_texture; /* The texture. */
1059 struct Object *mask_tex_map_obj; /* Name of the map object. */
1060 int mask_tex_mapping; /* How to map the texture! */
1061 char mask_tex_uvlayer_name[64]; /* Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME. */
1065 } WeightVGMixModifierData;
1067 /* How second vgroup's weights affect first ones. */
1069 MOD_WVG_MIX_SET = 1, /* Second weights replace weights. */
1070 MOD_WVG_MIX_ADD = 2, /* Second weights are added to weights. */
1071 MOD_WVG_MIX_SUB = 3, /* Second weights are subtracted from weights. */
1072 MOD_WVG_MIX_MUL = 4, /* Second weights are multiplied with weights. */
1073 MOD_WVG_MIX_DIV = 5, /* Second weights divide weights. */
1074 MOD_WVG_MIX_DIF = 6, /* Difference between second weights and weights. */
1075 MOD_WVG_MIX_AVG = 7, /* Average of both weights. */
1078 /* What vertices to affect. */
1080 MOD_WVG_SET_ALL = 1, /* Affect all vertices. */
1081 MOD_WVG_SET_A = 2, /* Affect only vertices in first vgroup. */
1082 MOD_WVG_SET_B = 3, /* Affect only vertices in second vgroup. */
1083 MOD_WVG_SET_OR = 4, /* Affect only vertices in one vgroup or the other. */
1084 MOD_WVG_SET_AND = 5, /* Affect only vertices in both vgroups. */
1087 typedef struct WeightVGProximityModifierData {
1088 ModifierData modifier;
1090 char defgrp_name[64]; /* Name of vertex group to modify/weight. MAX_VGROUP_NAME. */
1092 /* Proximity modes. */
1094 int proximity_flags;
1096 /* Target object from which to calculate vertices distances. */
1097 struct Object *proximity_ob_target;
1099 /* Masking options. */
1100 float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
1101 char mask_defgrp_name[64]; /* Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME */
1103 /* Texture masking. */
1104 int mask_tex_use_channel; /* Which channel to use as weightf. */
1105 struct Tex *mask_texture; /* The texture. */
1106 struct Object *mask_tex_map_obj; /* Name of the map object. */
1107 int mask_tex_mapping; /* How to map the texture! */
1108 char mask_tex_uvlayer_name[64]; /* Name of the UV Map. MAX_CUSTOMDATA_LAYER_NAME. */
1110 float min_dist, max_dist; /* Distances mapping to 0.0/1.0 weights. */
1112 /* Put here to avoid breaking existing struct... */
1113 short falloff_type; /* Using MOD_WVG_MAPPING_* enums. */
1117 } WeightVGProximityModifierData;
1119 /* Modes of proximity weighting. */
1121 MOD_WVG_PROXIMITY_OBJECT = 1, /* source vertex to other location */
1122 MOD_WVG_PROXIMITY_GEOMETRY = 2, /* source vertex to other geometry */
1125 /* Flags options for proximity weighting. */
1127 /* Use nearest vertices of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
1128 MOD_WVG_PROXIMITY_GEOM_VERTS = (1 << 0),
1129 /* Use nearest edges of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
1130 MOD_WVG_PROXIMITY_GEOM_EDGES = (1 << 1),
1131 /* Use nearest faces of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
1132 MOD_WVG_PROXIMITY_GEOM_FACES = (1 << 2),
1135 /* Defines common to all WeightVG modifiers. */
1136 /* Mapping modes. */
1138 MOD_WVG_MAPPING_NONE = 0,
1139 MOD_WVG_MAPPING_CURVE = 1,
1140 MOD_WVG_MAPPING_SHARP = 2, /* PROP_SHARP */
1141 MOD_WVG_MAPPING_SMOOTH = 3, /* PROP_SMOOTH */
1142 MOD_WVG_MAPPING_ROOT = 4, /* PROP_ROOT */
1143 /* PROP_LIN not used (same as NONE, here...). */
1144 /* PROP_CONST not used. */
1145 MOD_WVG_MAPPING_SPHERE = 7, /* PROP_SPHERE */
1146 MOD_WVG_MAPPING_RANDOM = 8, /* PROP_RANDOM */
1147 MOD_WVG_MAPPING_STEP = 9, /* Median Step. */
1150 /* Tex channel to be used as mask. */
1152 MOD_WVG_MASK_TEX_USE_INT = 1,
1153 MOD_WVG_MASK_TEX_USE_RED = 2,
1154 MOD_WVG_MASK_TEX_USE_GREEN = 3,
1155 MOD_WVG_MASK_TEX_USE_BLUE = 4,
1156 MOD_WVG_MASK_TEX_USE_HUE = 5,
1157 MOD_WVG_MASK_TEX_USE_SAT = 6,
1158 MOD_WVG_MASK_TEX_USE_VAL = 7,
1159 MOD_WVG_MASK_TEX_USE_ALPHA = 8,
1162 typedef struct DynamicPaintModifierData {
1163 ModifierData modifier;
1165 struct DynamicPaintCanvasSettings *canvas;
1166 struct DynamicPaintBrushSettings *brush;
1167 int type; /* ui display: canvas / brush */
1169 } DynamicPaintModifierData;
1171 /* Dynamic paint modifier flags */
1173 MOD_DYNAMICPAINT_TYPE_CANVAS = (1 << 0),
1174 MOD_DYNAMICPAINT_TYPE_BRUSH = (1 << 1),
1177 /* Remesh modifier */
1178 typedef enum RemeshModifierFlags {
1179 MOD_REMESH_FLOOD_FILL = 1,
1180 MOD_REMESH_SMOOTH_SHADING = 2,
1181 } RemeshModifierFlags;
1183 typedef enum RemeshModifierMode {
1185 MOD_REMESH_CENTROID = 0,
1187 MOD_REMESH_MASS_POINT = 1,
1188 /* keeps sharp edges */
1189 MOD_REMESH_SHARP_FEATURES = 2,
1190 } RemeshModifierMode;
1192 typedef struct RemeshModifierData {
1193 ModifierData modifier;
1195 /* floodfill option, controls how small components can be before they are removed */
1198 /* ratio between size of model and grid */
1209 } RemeshModifierData;
1212 typedef struct SkinModifierData {
1213 ModifierData modifier;
1215 float branch_smoothing;
1224 /* SkinModifierData.symmetry_axes */
1226 MOD_SKIN_SYMM_X = (1 << 0),
1227 MOD_SKIN_SYMM_Y = (1 << 1),
1228 MOD_SKIN_SYMM_Z = (1 << 2),
1231 /* SkinModifierData.flag */
1233 MOD_SKIN_SMOOTH_SHADING = 1,
1236 /* Triangulate modifier */
1237 typedef struct TriangulateModifierData {
1238 ModifierData modifier;
1244 } TriangulateModifierData;
1246 #ifdef DNA_DEPRECATED
1248 MOD_TRIANGULATE_BEAUTY = (1 << 0), /* deprecated */
1252 /* Triangulate methods - NGons */
1254 MOD_TRIANGULATE_NGON_BEAUTY = 0,
1255 MOD_TRIANGULATE_NGON_EARCLIP,
1258 /* Triangulate methods - Quads */
1260 MOD_TRIANGULATE_QUAD_BEAUTY = 0,
1261 MOD_TRIANGULATE_QUAD_FIXED,
1262 MOD_TRIANGULATE_QUAD_ALTERNATE,
1263 MOD_TRIANGULATE_QUAD_SHORTEDGE
1266 typedef struct LaplacianSmoothModifierData {
1267 ModifierData modifier;
1269 float lambda, lambda_border, pad1;
1270 char defgrp_name[64]; /* MAX_VGROUP_NAME */
1272 } LaplacianSmoothModifierData;
1274 /* Smooth modifier flags */
1276 MOD_LAPLACIANSMOOTH_X = (1 << 1),
1277 MOD_LAPLACIANSMOOTH_Y = (1 << 2),
1278 MOD_LAPLACIANSMOOTH_Z = (1 << 3),
1279 MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME = (1 << 4),
1280 MOD_LAPLACIANSMOOTH_NORMALIZED = (1 << 5),
1284 typedef struct CorrectiveSmoothModifierData {
1285 ModifierData modifier;
1287 /* positions set during 'bind' operator
1288 * use for MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND */
1289 float (*bind_coords)[3];
1291 /* note: -1 is used to bind */
1292 unsigned int bind_coords_num;
1296 char smooth_type, rest_source;
1299 char defgrp_name[64]; /* MAX_VGROUP_NAME */
1301 /* runtime-only cache (delta's between),
1302 * delta's between the original positions and the smoothed positions */
1303 float (*delta_cache)[3];
1304 unsigned int delta_cache_num;
1306 } CorrectiveSmoothModifierData;
1309 MOD_CORRECTIVESMOOTH_SMOOTH_SIMPLE = 0,
1310 MOD_CORRECTIVESMOOTH_SMOOTH_LENGTH_WEIGHT = 1,
1314 MOD_CORRECTIVESMOOTH_RESTSOURCE_ORCO = 0,
1315 MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND = 1,
1318 /* Corrective Smooth modifier flags */
1320 MOD_CORRECTIVESMOOTH_INVERT_VGROUP = (1 << 0),
1321 MOD_CORRECTIVESMOOTH_ONLY_SMOOTH = (1 << 1),
1322 MOD_CORRECTIVESMOOTH_PIN_BOUNDARY = (1 << 2),
1325 typedef struct UVWarpModifierData {
1326 ModifierData modifier;
1328 char axis_u, axis_v;
1330 float center[2]; /* used for rotate/scale */
1332 struct Object *object_src; /* source */
1333 char bone_src[64]; /* optional name of bone target, MAX_ID_NAME-2 */
1334 struct Object *object_dst; /* target */
1335 char bone_dst[64]; /* optional name of bone target, MAX_ID_NAME-2 */
1337 char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
1338 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
1339 } UVWarpModifierData;
1341 /* cache modifier */
1342 typedef struct MeshCacheModifierData {
1343 ModifierData modifier;
1346 char type; /* file format */
1350 /* axis conversion */
1361 /* play_mode == MOD_MESHCACHE_PLAY_CFEA */
1365 /* play_mode == MOD_MESHCACHE_PLAY_EVAL */
1366 /* we could use one float for all these but their purpose is very different */
1371 char filepath[1024]; /* FILE_MAX */
1372 } MeshCacheModifierData;
1375 MOD_MESHCACHE_TYPE_MDD = 1,
1376 MOD_MESHCACHE_TYPE_PC2 = 2,
1380 MOD_MESHCACHE_DEFORM_OVERWRITE = 0,
1381 MOD_MESHCACHE_DEFORM_INTEGRATE = 1,
1385 MOD_MESHCACHE_INTERP_NONE = 0,
1386 MOD_MESHCACHE_INTERP_LINEAR = 1,
1387 /* MOD_MESHCACHE_INTERP_CARDINAL = 2, */
1391 MOD_MESHCACHE_TIME_FRAME = 0,
1392 MOD_MESHCACHE_TIME_SECONDS = 1,
1393 MOD_MESHCACHE_TIME_FACTOR = 2,
1397 MOD_MESHCACHE_PLAY_CFEA = 0,
1398 MOD_MESHCACHE_PLAY_EVAL = 1,
1402 typedef struct LaplacianDeformModifierData {
1403 ModifierData modifier;
1404 char anchor_grp_name[64]; /* MAX_VGROUP_NAME */
1405 int total_verts, repeat;
1407 void *cache_system; /* runtime only */
1410 } LaplacianDeformModifierData;
1412 /* Smooth modifier flags */
1414 MOD_LAPLACIANDEFORM_BIND = 1,
1417 /* many of these options match 'solidify' */
1418 typedef struct WireframeModifierData {
1419 ModifierData modifier;
1420 char defgrp_name[64]; /* MAX_VGROUP_NAME */
1423 float offset_fac_vg;
1424 float crease_weight;
1425 short flag, mat_ofs;
1427 } WireframeModifierData;
1430 MOD_WIREFRAME_INVERT_VGROUP = (1 << 0),
1431 MOD_WIREFRAME_REPLACE = (1 << 1),
1432 MOD_WIREFRAME_BOUNDARY = (1 << 2),
1433 MOD_WIREFRAME_OFS_EVEN = (1 << 3),
1434 MOD_WIREFRAME_OFS_RELATIVE = (1 << 4),
1435 MOD_WIREFRAME_CREASE = (1 << 5),
1439 typedef struct DataTransferModifierData {
1440 ModifierData modifier;
1442 struct Object *ob_source;
1444 int data_types; /* See DT_TYPE_ enum in ED_object.h */
1446 /* See MREMAP_MODE_ enum in BKE_mesh_mapping.h */
1452 float map_max_distance;
1453 float map_ray_radius;
1454 float islands_precision;
1458 int layers_select_src[4]; /* DT_MULTILAYER_INDEX_MAX; See DT_FROMLAYERS_ enum in ED_object.h */
1459 int layers_select_dst[4]; /* DT_MULTILAYER_INDEX_MAX; See DT_TOLAYERS_ enum in ED_object.h */
1461 int mix_mode; /* See CDT_MIX_ enum in BKE_customdata.h */
1463 char defgrp_name[64]; /* MAX_VGROUP_NAME */
1466 } DataTransferModifierData;
1468 /* DataTransferModifierData.flags */
1470 MOD_DATATRANSFER_OBSRC_TRANSFORM = 1 << 0,
1471 MOD_DATATRANSFER_MAP_MAXDIST = 1 << 1,
1472 MOD_DATATRANSFER_INVERT_VGROUP = 1 << 2,
1474 /* Only for UI really. */
1475 MOD_DATATRANSFER_USE_VERT = 1 << 28,
1476 MOD_DATATRANSFER_USE_EDGE = 1 << 29,
1477 MOD_DATATRANSFER_USE_LOOP = 1 << 30,
1478 MOD_DATATRANSFER_USE_POLY = 1 << 31,
1481 /* Set Split Normals modifier */
1482 typedef struct NormalEditModifierData {
1483 ModifierData modifier;
1484 char defgrp_name[64]; /* MAX_VGROUP_NAME */
1485 struct Object *target; /* Source of normals, or center of ellipsoid. */
1494 } NormalEditModifierData;
1496 /* NormalEditModifierData.mode */
1498 MOD_NORMALEDIT_MODE_RADIAL = 0,
1499 MOD_NORMALEDIT_MODE_DIRECTIONAL = 1,
1502 /* NormalEditModifierData.flags */
1504 MOD_NORMALEDIT_INVERT_VGROUP = (1 << 0),
1505 MOD_NORMALEDIT_USE_DIRECTION_PARALLEL = (1 << 1),
1508 /* NormalEditModifierData.mix_mode */
1510 MOD_NORMALEDIT_MIX_COPY = 0,
1511 MOD_NORMALEDIT_MIX_ADD = 1,
1512 MOD_NORMALEDIT_MIX_SUB = 2,
1513 MOD_NORMALEDIT_MIX_MUL = 3,
1516 typedef struct MeshSeqCacheModifierData {
1517 ModifierData modifier;
1519 struct CacheFile *cache_file;
1520 char object_path[1024]; /* 1024 = FILE_MAX */
1524 } MeshSeqCacheModifierData;
1526 /* MeshSeqCacheModifierData.read_flag */
1528 MOD_MESHSEQ_READ_VERT = (1 << 0),
1529 MOD_MESHSEQ_READ_POLY = (1 << 1),
1530 MOD_MESHSEQ_READ_UV = (1 << 2),
1531 MOD_MESHSEQ_READ_COLOR = (1 << 3),
1534 #define MOD_MESHSEQ_READ_ALL \
1535 (MOD_MESHSEQ_READ_VERT | MOD_MESHSEQ_READ_POLY | MOD_MESHSEQ_READ_UV | MOD_MESHSEQ_READ_COLOR)
1537 #endif /* __DNA_MODIFIER_TYPES_H__ */