LEFT | RIGHT |
1 /* | 1 /* |
2 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 10 matching lines...) Expand all Loading... |
21 /** \file DNA_modifier_types.h | 21 /** \file DNA_modifier_types.h |
22 * \ingroup DNA | 22 * \ingroup DNA |
23 */ | 23 */ |
24 | 24 |
25 #ifndef __DNA_MODIFIER_TYPES_H__ | 25 #ifndef __DNA_MODIFIER_TYPES_H__ |
26 #define __DNA_MODIFIER_TYPES_H__ | 26 #define __DNA_MODIFIER_TYPES_H__ |
27 | 27 |
28 #include "DNA_defs.h" | 28 #include "DNA_defs.h" |
29 #include "DNA_listBase.h" | 29 #include "DNA_listBase.h" |
30 | 30 |
31 | |
32 #define MODSTACK_DEBUG 1 | |
33 | |
34 /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! | 31 /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! |
35 * (ONLY ADD NEW ITEMS AT THE END) */ | 32 * (ONLY ADD NEW ITEMS AT THE END) |
| 33 */ |
36 | 34 |
37 typedef enum ModifierType { | 35 typedef enum ModifierType { |
38 » eModifierType_None = 0, | 36 » eModifierType_None = 0, |
39 » eModifierType_Subsurf, | 37 » eModifierType_Subsurf = 1, |
40 » eModifierType_Lattice, | 38 » eModifierType_Lattice = 2, |
41 » eModifierType_Curve, | 39 » eModifierType_Curve = 3, |
42 » eModifierType_Build, | 40 » eModifierType_Build = 4, |
43 » eModifierType_Mirror, | 41 » eModifierType_Mirror = 5, |
44 » eModifierType_Decimate, | 42 » eModifierType_Decimate = 6, |
45 » eModifierType_Wave, | 43 » eModifierType_Wave = 7, |
46 » eModifierType_Armature, | 44 » eModifierType_Armature = 8, |
47 » eModifierType_Hook, | 45 » eModifierType_Hook = 9, |
48 » eModifierType_Softbody, | 46 » eModifierType_Softbody = 10, |
49 » eModifierType_Boolean, | 47 » eModifierType_Boolean = 11, |
50 » eModifierType_Array, | 48 » eModifierType_Array = 12, |
51 » eModifierType_EdgeSplit, | 49 » eModifierType_EdgeSplit = 13, |
52 » eModifierType_Displace, | 50 » eModifierType_Displace = 14, |
53 » eModifierType_UVProject, | 51 » eModifierType_UVProject = 15, |
54 » eModifierType_Smooth, | 52 » eModifierType_Smooth = 16, |
55 » eModifierType_Cast, | 53 » eModifierType_Cast = 17, |
56 » eModifierType_MeshDeform, | 54 » eModifierType_MeshDeform = 18, |
57 » eModifierType_ParticleSystem, | 55 » eModifierType_ParticleSystem = 19, |
58 » eModifierType_ParticleInstance, | 56 » eModifierType_ParticleInstance = 20, |
59 » eModifierType_Explode, | 57 » eModifierType_Explode = 21, |
60 » eModifierType_Cloth, | 58 » eModifierType_Cloth = 22, |
61 » eModifierType_Collision, | 59 » eModifierType_Collision = 23, |
62 » eModifierType_Bevel, | 60 » eModifierType_Bevel = 24, |
63 » eModifierType_Shrinkwrap, | 61 » eModifierType_Shrinkwrap = 25, |
64 » eModifierType_Fluidsim, | 62 » eModifierType_Fluidsim = 26, |
65 » eModifierType_Mask, | 63 » eModifierType_Mask = 27, |
66 » eModifierType_SimpleDeform, | 64 » eModifierType_SimpleDeform = 28, |
67 » eModifierType_Multires, | 65 » eModifierType_Multires = 29, |
68 » eModifierType_Surface, | 66 » eModifierType_Surface = 30, |
69 » eModifierType_Smoke, | 67 » eModifierType_Smoke = 31, |
70 » eModifierType_ShapeKey, | 68 » eModifierType_ShapeKey = 32, |
71 » eModifierType_Solidify, | 69 » eModifierType_Solidify = 33, |
72 » eModifierType_Screw, | 70 » eModifierType_Screw = 34, |
73 » eModifierType_Warp, | 71 » eModifierType_Warp = 35, |
74 » eModifierType_WeightVGEdit, | 72 » eModifierType_WeightVGEdit = 36, |
75 » eModifierType_WeightVGMix, | 73 » eModifierType_WeightVGMix = 37, |
76 » eModifierType_WeightVGProximity, | 74 » eModifierType_WeightVGProximity = 38, |
| 75 » eModifierType_Ocean = 39, |
| 76 » eModifierType_DynamicPaint = 40, |
77 eModifierType_Ocean, | 77 eModifierType_Ocean, |
78 eModifierType_DynamicPaint, | 78 eModifierType_DynamicPaint, |
79 eModifierType_Remesh, | 79 eModifierType_Remesh, |
80 eModifierType_Skin, | |
81 NUM_MODIFIER_TYPES | 80 NUM_MODIFIER_TYPES |
82 } ModifierType; | 81 } ModifierType; |
83 | 82 |
84 typedef enum ModifierMode { | |
85 eModifierMode_Realtime = (1<<0), | |
86 eModifierMode_Render = (1<<1), | |
87 eModifierMode_Editmode = (1<<2), | |
88 eModifierMode_OnCage = (1<<3), | |
89 eModifierMode_Expanded = (1<<4), | |
90 eModifierMode_Virtual = (1<<5), | |
91 eModifierMode_ApplyOnSpline = (1<<6), | |
92 eModifierMode_DisableTemporary = (1 << 31) | |
93 } ModifierMode; | |
94 | |
95 typedef struct ModifierData { | |
96 struct ModifierData *next, *prev; | |
97 | |
98 int type, mode; | |
99 int stackindex, pad; | |
100 char name[64]; /* MAX_NAME */ | |
101 ········ | |
102 /* XXX for timing info set by caller... solve later? (ton) */ | |
103 struct Scene *scene; | |
104 ········ | |
105 char *error; | |
106 } ModifierData; | |
107 | |
108 typedef enum { | |
109 eSubsurfModifierFlag_Incremental = (1<<0), | |
110 eSubsurfModifierFlag_DebugIncr = (1<<1), | |
111 eSubsurfModifierFlag_ControlEdges = (1<<2), | |
112 eSubsurfModifierFlag_SubsurfUv = (1<<3) | |
113 } SubsurfModifierFlag; | |
114 | |
115 /* not a real modifier */ | |
116 typedef struct MappingInfoModifierData { | |
117 ModifierData modifier; | |
118 | |
119 struct Tex *texture; | |
120 struct Object *map_object; | |
121 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ | |
122 int uvlayer_tmp; | |
123 int texmapping; | |
124 } MappingInfoModifierData; | |
125 | |
126 typedef struct SubsurfModifierData { | |
127 ModifierData modifier; | |
128 | |
129 short subdivType, levels, renderLevels, flags; | |
130 | |
131 void *emCache, *mCache; | |
132 } SubsurfModifierData; | |
133 | |
134 typedef struct LatticeModifierData { | |
135 ModifierData modifier; | |
136 | |
137 struct Object *object; | |
138 char name[64]; /* optional vertexgroup name, MAX_VGROUP
_NAME */ | |
139 float strength; | |
140 char pad[4]; | |
141 } LatticeModifierData; | |
142 | |
143 typedef struct CurveModifierData { | |
144 ModifierData modifier; | |
145 | |
146 struct Object *object; | |
147 char name[64]; /* optional vertexgroup name, MAX_VGROUP
_NAME */ | |
148 short defaxis; /* axis along which curve deforms */ | |
149 char pad[6]; | |
150 } CurveModifierData; | |
151 | |
152 /* CurveModifierData->defaxis */ | |
153 #define MOD_CURVE_POSX 1 | |
154 #define MOD_CURVE_POSY 2 | |
155 #define MOD_CURVE_POSZ 3 | |
156 #define MOD_CURVE_NEGX 4 | |
157 #define MOD_CURVE_NEGY 5 | |
158 #define MOD_CURVE_NEGZ 6 | |
159 | |
160 typedef struct BuildModifierData { | |
161 ModifierData modifier; | |
162 | |
163 float start, length; | |
164 int randomize, seed; | |
165 } BuildModifierData; | |
166 | |
167 /* Mask Modifier */ | |
168 typedef struct MaskModifierData { | |
169 ModifierData modifier; | |
170 ········ | |
171 struct Object *ob_arm; /* armature to use to in place of hardcoded vgro
up */ | |
172 char vgroup[64]; /* name of vertex group to use to mask,
MAX_VGROUP_NAME */ | |
173 ········ | |
174 int mode; /* using armature or hardcoded v
group */ | |
175 int flag; /* flags for various things */ | |
176 } MaskModifierData; | |
177 | |
178 /* Mask Modifier -> mode */ | |
179 #define MOD_MASK_MODE_VGROUP 0 | |
180 #define MOD_MASK_MODE_ARM 1 | |
181 | |
182 /* Mask Modifier -> flag */ | |
183 #define MOD_MASK_INV (1<<0) | |
184 | |
185 typedef struct ArrayModifierData { | |
186 ModifierData modifier; | |
187 | |
188 /* the object with which to cap the start of the array */ | |
189 struct Object *start_cap; | |
190 /* the object with which to cap the end of the array */ | |
191 struct Object *end_cap; | |
192 /* the curve object to use for MOD_ARR_FITCURVE */ | |
193 struct Object *curve_ob; | |
194 /* the object to use for object offset */ | |
195 struct Object *offset_ob; | |
196 /* a constant duplicate offset; | |
197 * 1 means the duplicates are 1 unit apart | |
198 */ | |
199 float offset[3]; | |
200 /* a scaled factor for duplicate offsets; | |
201 * 1 means the duplicates are 1 object-width apart | |
202 */ | |
203 float scale[3]; | |
204 /* the length over which to distribute the duplicates */ | |
205 float length; | |
206 /* the limit below which to merge vertices in adjacent duplicates */ | |
207 float merge_dist; | |
208 /* determines how duplicate count is calculated; one of: | |
209 * - MOD_ARR_FIXEDCOUNT -> fixed | |
210 * - MOD_ARR_FITLENGTH -> calculated to fit a set length | |
211 * - MOD_ARR_FITCURVE -> calculated to fit the length of a Curve objec
t | |
212 */ | |
213 int fit_type; | |
214 /* flags specifying how total offset is calculated; binary OR of: | |
215 * - MOD_ARR_OFF_CONST -> total offset += offset | |
216 * - MOD_ARR_OFF_RELATIVE -> total offset += relative * object width | |
217 * - MOD_ARR_OFF_OBJ -> total offset += offset_ob's matrix | |
218 * total offset is the sum of the individual enabled offsets | |
219 */ | |
220 int offset_type; | |
221 /* general flags: | |
222 * MOD_ARR_MERGE -> merge vertices in adjacent duplicates | |
223 */ | |
224 int flags; | |
225 /* the number of duplicates to generate for MOD_ARR_FIXEDCOUNT */ | |
226 int count; | |
227 } ArrayModifierData; | |
228 | |
229 /* ArrayModifierData->fit_type */ | |
230 #define MOD_ARR_FIXEDCOUNT 0 | |
231 #define MOD_ARR_FITLENGTH 1 | |
232 #define MOD_ARR_FITCURVE 2 | |
233 | |
234 /* ArrayModifierData->offset_type */ | |
235 #define MOD_ARR_OFF_CONST (1<<0) | |
236 #define MOD_ARR_OFF_RELATIVE (1<<1) | |
237 #define MOD_ARR_OFF_OBJ (1<<2) | |
238 | |
239 /* ArrayModifierData->flags */ | |
240 #define MOD_ARR_MERGE (1<<0) | |
241 #define MOD_ARR_MERGEFINAL (1<<1) | |
242 | |
243 typedef struct MirrorModifierData { | |
244 ModifierData modifier; | |
245 | |
246 short axis DNA_DEPRECATED; /* deprecated, use flag instead */ | |
247 short flag; | |
248 float tolerance; | |
249 struct Object *mirror_ob; | |
250 } MirrorModifierData; | |
251 | |
252 /* MirrorModifierData->flag */ | |
253 #define MOD_MIR_CLIPPING (1<<0) | |
254 #define MOD_MIR_MIRROR_U (1<<1) | |
255 #define MOD_MIR_MIRROR_V (1<<2) | |
256 #define MOD_MIR_AXIS_X (1<<3) | |
257 #define MOD_MIR_AXIS_Y (1<<4) | |
258 #define MOD_MIR_AXIS_Z (1<<5) | |
259 #define MOD_MIR_VGROUP (1<<6) | |
260 #define MOD_MIR_NO_MERGE (1<<7) | |
261 | |
262 typedef struct EdgeSplitModifierData { | |
263 ModifierData modifier; | |
264 | |
265 float split_angle; /* angle above which edges should be split */ | |
266 int flags; | |
267 } EdgeSplitModifierData; | |
268 | |
269 /* EdgeSplitModifierData->flags */ | |
270 #define MOD_EDGESPLIT_FROMANGLE (1<<1) | |
271 #define MOD_EDGESPLIT_FROMFLAG (1<<2) | |
272 | |
273 typedef struct BevelModifierData { | |
274 ModifierData modifier; | |
275 | |
276 float value; /* the "raw" bevel value (distance/amount to bevel
) */ | |
277 int res; /* the resolution (as originally coded, it is the
number of recursive bevels) */ | |
278 int pad; | |
279 short flags; /* general option flags */ | |
280 short val_flags; /* flags used to interpret the bevel value */ | |
281 short lim_flags; /* flags to tell the tool how to limit the bevel *
/ | |
282 short e_flags; /* flags to direct how edge weights are applied to
verts */ | |
283 float bevel_angle; /* if the BME_BEVEL_ANGLE is set, this will be how
"sharp" an edge must be before it gets beveled */ | |
284 char defgrp_name[64]; /* if the BME_BEVEL_VWEIGHT option is set, this wi
ll be the name of the vert group, MAX_VGROUP_NAME */ | |
285 } BevelModifierData; | |
286 | |
287 typedef struct BMeshModifierData { | |
288 ModifierData modifier; | |
289 | |
290 float pad; | |
291 int type; | |
292 } BMeshModifierData; | |
293 | |
294 | |
295 /* Smoke modifier flags */ | |
296 #define MOD_SMOKE_TYPE_DOMAIN (1 << 0) | |
297 #define MOD_SMOKE_TYPE_FLOW (1 << 1) | |
298 #define MOD_SMOKE_TYPE_COLL (1 << 2) | |
299 | |
300 typedef struct SmokeModifierData { | |
301 ModifierData modifier; | |
302 | |
303 struct SmokeDomainSettings *domain; | |
304 struct SmokeFlowSettings *flow; /* inflow, outflow, smoke objects */ | |
305 struct SmokeCollSettings *coll; /* collision objects */ | |
306 float time; | |
307 int type; /* domain, inflow, outflow, ... */ | |
308 } SmokeModifierData; | |
309 | |
310 typedef struct DisplaceModifierData { | |
311 ModifierData modifier; | |
312 | |
313 /* keep in sync with MappingInfoModifierData */ | |
314 struct Tex *texture; | |
315 struct Object *map_object; | |
316 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ | |
317 int uvlayer_tmp; | |
318 int texmapping; | |
319 /* end MappingInfoModifierData */ | |
320 | |
321 float strength; | |
322 int direction; | |
323 char defgrp_name[64]; /* MAX_VGROUP_NAME */ | |
324 float midlevel; | |
325 int pad; | |
326 } DisplaceModifierData; | |
327 | |
328 /* DisplaceModifierData->direction */ | |
329 enum { | |
330 MOD_DISP_DIR_X, | |
331 MOD_DISP_DIR_Y, | |
332 MOD_DISP_DIR_Z, | |
333 MOD_DISP_DIR_NOR, | |
334 MOD_DISP_DIR_RGB_XYZ, | |
335 }; | |
336 | |
337 /* DisplaceModifierData->texmapping */ | |
338 enum { | |
339 MOD_DISP_MAP_LOCAL, | |
340 MOD_DISP_MAP_GLOBAL, | |
341 MOD_DISP_MAP_OBJECT, | |
342 MOD_DISP_MAP_UV | |
343 }; | |
344 | |
345 typedef struct UVProjectModifierData { | |
346 ModifierData modifier; | |
347 | |
348 /* the objects which do the projecting */ | |
349 struct Object *projectors[10]; /* MOD_UVPROJECT_MAX */ | |
350 struct Image *image; /* the image to project */ | |
351 int flags; | |
352 int num_projectors; | |
353 float aspectx, aspecty; | |
354 float scalex, scaley;·································································································· | |
355 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ | |
356 int uvlayer_tmp, pad; | |
357 } UVProjectModifierData; | |
358 | |
359 #define MOD_UVPROJECT_MAXPROJECTORS 10 | |
360 | |
361 /* UVProjectModifierData->flags */ | |
362 #define MOD_UVPROJECT_OVERRIDEIMAGE (1<<0) | |
363 | |
364 typedef struct DecimateModifierData { | |
365 ModifierData modifier; | |
366 | |
367 float percent; | |
368 int faceCount; | |
369 } DecimateModifierData; | |
370 | |
371 /* Smooth modifier flags */ | |
372 #define MOD_SMOOTH_X (1<<1) | |
373 #define MOD_SMOOTH_Y (1<<2) | |
374 #define MOD_SMOOTH_Z (1<<3) | |
375 | |
376 typedef struct SmoothModifierData { | |
377 ModifierData modifier; | |
378 float fac; | |
379 char defgrp_name[64]; /* MAX_VGROUP_NAME */ | |
380 short flag, repeat; | |
381 | |
382 } SmoothModifierData; | |
383 | |
384 /* Cast modifier flags */ | |
385 #define MOD_CAST_X (1<<1) | |
386 #define MOD_CAST_Y (1<<2) | |
387 #define MOD_CAST_Z (1<<3) | |
388 #define MOD_CAST_USE_OB_TRANSFORM (1<<4) | |
389 #define MOD_CAST_SIZE_FROM_RADIUS (1<<5) | |
390 | |
391 /* Cast modifier projection types */ | |
392 #define MOD_CAST_TYPE_SPHERE 0 | |
393 #define MOD_CAST_TYPE_CYLINDER 1 | |
394 #define MOD_CAST_TYPE_CUBOID 2 | |
395 | |
396 typedef struct CastModifierData { | |
397 ModifierData modifier; | |
398 | |
399 struct Object *object; | |
400 float fac; | |
401 float radius; | |
402 float size; | |
403 char defgrp_name[64]; /* MAX_VGROUP_NAME */ | |
404 short flag, type; | |
405 } CastModifierData; | |
406 | |
407 /* WaveModifierData.flag */ | |
408 #define MOD_WAVE_X (1<<1) | |
409 #define MOD_WAVE_Y (1<<2) | |
410 #define MOD_WAVE_CYCL (1<<3) | |
411 #define MOD_WAVE_NORM (1<<4) | |
412 #define MOD_WAVE_NORM_X (1<<5) | |
413 #define MOD_WAVE_NORM_Y (1<<6) | |
414 #define MOD_WAVE_NORM_Z (1<<7) | |
415 | |
416 typedef struct WaveModifierData { | |
417 ModifierData modifier; | |
418 | |
419 /* keep in sync with MappingInfoModifierData */ | |
420 struct Tex *texture; | |
421 struct Object *map_object; | |
422 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ | |
423 int uvlayer_tmp; | |
424 int texmapping; | |
425 /* end MappingInfoModifierData */ | |
426 | |
427 struct Object *objectcenter; | |
428 char defgrp_name[64]; /* MAX_VGROUP_NAME */ | |
429 | |
430 short flag, pad; | |
431 | |
432 float startx, starty, height, width; | |
433 float narrow, speed, damp, falloff; | |
434 | |
435 float timeoffs, lifetime; | |
436 float pad1; | |
437 } WaveModifierData; | |
438 | |
439 typedef struct ArmatureModifierData { | |
440 ModifierData modifier; | |
441 | |
442 short deformflag, multi; /* deformflag replaces armature-
>deformflag */ | |
443 int pad2; | |
444 struct Object *object; | |
445 float *prevCos; /* stored input of previous modifier, for vertex
group blending */ | |
446 char defgrp_name[64]; /* MAX_VGROUP_NAME */ | |
447 } ArmatureModifierData; | |
448 | |
449 typedef struct HookModifierData { | |
450 ModifierData modifier; | |
451 | |
452 struct Object *object; | |
453 char subtarget[64]; /* optional name of bone target, MAX_ID_
NAME-2 */ | |
454 ········ | |
455 float parentinv[4][4]; /* matrix making current transform unmodified */ | |
456 float cent[3]; /* visualization of hook */ | |
457 float falloff; /* if not zero, falloff is distance wher
e influence zero */ | |
458 ········ | |
459 int *indexar; /* if NULL, it's using vertexgroup */ | |
460 int totindex; | |
461 float force; | |
462 char name[64]; /* optional vertexgroup name, MAX_VGROUP
_NAME */ | |
463 } HookModifierData; | |
464 | |
465 typedef struct SoftbodyModifierData { | |
466 ModifierData modifier; | |
467 } SoftbodyModifierData; | |
468 | |
469 typedef struct ClothModifierData { | |
470 ModifierData modifier; | |
471 | |
472 struct Scene *scene; /* the context, time etc is here
*/ | |
473 struct Cloth *clothObject; /* The internal data structure f
or cloth. */ | |
474 struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.
h */ | |
475 struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_type
s.h */ | |
476 struct PointCache *point_cache; /* definition is in DNA_object_force.h *
/ | |
477 struct ListBase ptcaches; | |
478 } ClothModifierData; | |
479 | |
480 typedef struct CollisionModifierData { | |
481 ModifierData modifier; | |
482 ········ | |
483 struct MVert *x; /* position at the beginning of the frame */ | |
484 struct MVert *xnew; /* position at the end of the frame */ | |
485 struct MVert *xold; /* unsued atm, but was discussed during sprint */ | |
486 struct MVert *current_xnew; /* new position at the actual inter-frame st
ep */ | |
487 struct MVert *current_x; /* position at the actual inter-frame step */ | |
488 struct MVert *current_v; /* (xnew - x) at the actual inter-frame step */ | |
489 ········ | |
490 struct MFace *mfaces; /* object face data */ | |
491 ········ | |
492 unsigned int numverts; | |
493 unsigned int numfaces; | |
494 float time_x, time_xnew; /* cfra time of modifier */ | |
495 struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth obj
ect */ | |
496 } CollisionModifierData; | |
497 | |
498 typedef struct SurfaceModifierData { | |
499 ModifierData modifier; | |
500 | |
501 struct MVert *x; /* old position */ | |
502 struct MVert *v; /* velocity */ | |
503 | |
504 struct DerivedMesh *dm; | |
505 | |
506 struct BVHTreeFromMesh *bvhtree; /* bounding volume hierarchy of the mes
h faces */ | |
507 | |
508 int cfra, numverts; | |
509 } SurfaceModifierData; | |
510 | |
511 typedef enum { | |
512 eBooleanModifierOp_Intersect, | |
513 eBooleanModifierOp_Union, | |
514 eBooleanModifierOp_Difference, | |
515 } BooleanModifierOp; | |
516 typedef struct BooleanModifierData { | |
517 ModifierData modifier; | |
518 | |
519 struct Object *object; | |
520 int operation, pad; | |
521 } BooleanModifierData; | |
522 | |
523 #define MOD_MDEF_INVERT_VGROUP (1<<0) | |
524 #define MOD_MDEF_DYNAMIC_BIND (1<<1) | |
525 | |
526 #define MOD_MDEF_VOLUME 0 | |
527 #define MOD_MDEF_SURFACE 1 | |
528 | |
529 typedef struct MDefInfluence { | |
530 int vertex; | |
531 float weight; | |
532 } MDefInfluence; | |
533 | |
534 typedef struct MDefCell { | |
535 int offset; | |
536 int totinfluence; | |
537 } MDefCell; | |
538 | |
539 typedef struct MeshDeformModifierData { | |
540 ModifierData modifier; | |
541 | |
542 struct Object *object; /* mesh object */ | |
543 char defgrp_name[64]; /* optional vertexgroup name, MA
X_VGROUP_NAME */ | |
544 | |
545 short gridsize, flag, mode, pad; | |
546 | |
547 /* result of static binding */ | |
548 MDefInfluence *bindinfluences; /* influences */ | |
549 int *bindoffsets; /* offsets into influenc
es array */ | |
550 float *bindcagecos; /* coordinates that cage
was bound with */ | |
551 int totvert, totcagevert; /* total vertices in mesh and ca
ge */ | |
552 | |
553 /* result of dynamic binding */ | |
554 MDefCell *dyngrid; /* grid with dynamic bin
ding cell points */ | |
555 MDefInfluence *dyninfluences; /* dynamic binding vertex influences */ | |
556 int *dynverts, *pad2; /* is this vertex bound or not?
*/ | |
557 int dyngridsize; /* size of the dynamic b
ind grid */ | |
558 int totinfluence; /* total number of verte
x influences */ | |
559 float dyncellmin[3]; /* offset of the dynamic bind gr
id */ | |
560 float dyncellwidth; /* width of dynamic bind
cell */ | |
561 float bindmat[4][4]; /* matrix of cage at binding tim
e */ | |
562 | |
563 /* deprecated storage */ | |
564 float *bindweights; /* deprecated inefficien
t storage */ | |
565 float *bindcos; /* deprecated storage of
cage coords */ | |
566 | |
567 /* runtime */ | |
568 void (*bindfunc)(struct Scene *scene, | |
569 struct MeshDeformModifierData *mmd, | |
570 float *vertexcos, int totvert, float cagemat[][4]); | |
571 } MeshDeformModifierData; | |
572 | |
573 typedef enum { | |
574 eParticleSystemFlag_Pars = (1<<0), | |
575 eParticleSystemFlag_psys_updated = (1<<1), | |
576 eParticleSystemFlag_file_loaded = (1<<2), | |
577 } ParticleSystemModifierFlag; | |
578 | |
579 typedef struct ParticleSystemModifierData { | |
580 ModifierData modifier; | |
581 struct ParticleSystem *psys; | |
582 struct DerivedMesh *dm; | |
583 int totdmvert, totdmedge, totdmface; | |
584 short flag, rt; | |
585 } ParticleSystemModifierData; | |
586 | |
587 typedef enum { | |
588 eParticleInstanceFlag_Parents = (1<<0), | |
589 eParticleInstanceFlag_Children = (1<<1), | |
590 eParticleInstanceFlag_Path = (1<<2), | |
591 eParticleInstanceFlag_Unborn = (1<<3), | |
592 eParticleInstanceFlag_Alive = (1<<4), | |
593 eParticleInstanceFlag_Dead = (1<<5), | |
594 eParticleInstanceFlag_KeepShape = (1<<6), | |
595 eParticleInstanceFlag_UseSize = (1<<7), | |
596 } ParticleInstanceModifierFlag; | |
597 | |
598 typedef struct ParticleInstanceModifierData { | |
599 ModifierData modifier; | |
600 struct Object *ob; | |
601 short psys, flag, axis, rt; | |
602 float position, random_position; | |
603 } ParticleInstanceModifierData; | |
604 | |
605 typedef enum { | |
606 eExplodeFlag_CalcFaces = (1<<0), | |
607 eExplodeFlag_PaSize = (1<<1), | |
608 eExplodeFlag_EdgeCut = (1<<2), | |
609 eExplodeFlag_Unborn = (1<<3), | |
610 eExplodeFlag_Alive = (1<<4), | |
611 eExplodeFlag_Dead = (1<<5), | |
612 } ExplodeModifierFlag; | |
613 | |
614 typedef struct ExplodeModifierData { | |
615 ModifierData modifier; | |
616 int *facepa; | |
617 short flag, vgroup; | |
618 float protect; | |
619 char uvname[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ | |
620 } ExplodeModifierData; | |
621 | |
622 typedef struct MultiresModifierData { | |
623 ModifierData modifier; | |
624 | |
625 char lvl, sculptlvl, renderlvl, totlvl; | |
626 char simple, flags, pad[2]; | |
627 } MultiresModifierData; | |
628 | |
629 typedef enum { | |
630 eMultiresModifierFlag_ControlEdges = (1<<0), | |
631 eMultiresModifierFlag_PlainUv = (1<<1), | |
632 } MultiresModifierFlag; | |
633 | |
634 typedef struct FluidsimModifierData { | |
635 ModifierData modifier; | |
636 ········ | |
637 struct FluidsimSettings *fss; /* definition is in DNA_object_fluidsim.h
*/ | |
638 struct PointCache *point_cache; /* definition is in DNA_object_force.h *
/ | |
639 } FluidsimModifierData; | |
640 | |
641 typedef struct ShrinkwrapModifierData { | |
642 ModifierData modifier; | |
643 | |
644 struct Object *target; /* shrink target */ | |
645 struct Object *auxTarget; /* additional shrink target */ | |
646 char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ | |
647 float keepDist; /* distance offset to keep from mesh/pro
jection point */ | |
648 short shrinkType; /* shrink type projection */ | |
649 short shrinkOpts; /* shrink options */ | |
650 char projAxis; /* axis to project over */ | |
651 | |
652 /* | |
653 * if using projection over vertex normal this controls the | |
654 * the level of subsurface that must be done before getting the | |
655 * vertex coordinates and normal | |
656 */ | |
657 char subsurfLevels; | |
658 | |
659 char pad[6]; | |
660 | |
661 } ShrinkwrapModifierData; | |
662 | |
663 /* Shrinkwrap->shrinkType */ | |
664 #define MOD_SHRINKWRAP_NEAREST_SURFACE 0 | |
665 #define MOD_SHRINKWRAP_PROJECT 1 | |
666 #define MOD_SHRINKWRAP_NEAREST_VERTEX 2 | |
667 | |
668 /* Shrinkwrap->shrinkOpts */ | |
669 #define MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR (1<<0) /* allow shrinkwrap to m
ove the vertex in the positive direction of axis */ | |
670 #define MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR (1<<1) /* allow shrinkwrap to m
ove the vertex in the negative direction of axis */ | |
671 | |
672 #define MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE (1<<3) /* ignore vertex moves i
f a vertex ends projected on a front face of the target */ | |
673 #define MOD_SHRINKWRAP_CULL_TARGET_BACKFACE (1<<4) /* ignore vertex
moves if a vertex ends projected on a back face of the target */ | |
674 | |
675 #define MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE (1<<5) /* distance is m
easure to the front face of the target */ | |
676 | |
677 #define MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS (1<<0) | |
678 #define MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS (1<<1) | |
679 #define MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS (1<<2) | |
680 #define MOD_SHRINKWRAP_PROJECT_OVER_NORMAL 0 /* proje
ction over normal is used if no axis is selected */ | |
681 | |
682 | |
683 typedef struct SimpleDeformModifierData { | |
684 ModifierData modifier; | |
685 | |
686 struct Object *origin; /* object to control the origin of modifier spac
e coordinates */ | |
687 char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ | |
688 float factor; /* factors to control simple deforms */ | |
689 float limit[2]; /* lower and upper limit */············· | |
690 | |
691 char mode; /* deform function */ | |
692 char axis; /* lock axis (for taper and stre
ch) */ | |
693 char originOpts; /* originOptions */ | |
694 char pad; | |
695 | |
696 } SimpleDeformModifierData; | |
697 | |
698 #define MOD_SIMPLEDEFORM_MODE_TWIST 1 | |
699 #define MOD_SIMPLEDEFORM_MODE_BEND 2 | |
700 #define MOD_SIMPLEDEFORM_MODE_TAPER 3 | |
701 #define MOD_SIMPLEDEFORM_MODE_STRETCH 4 | |
702 | |
703 #define MOD_SIMPLEDEFORM_LOCK_AXIS_X (1<<0) | |
704 #define MOD_SIMPLEDEFORM_LOCK_AXIS_Y (1<<1) | |
705 | |
706 /* indicates whether simple deform should use the local | |
707 * coordinates or global coordinates of origin */ | |
708 #define MOD_SIMPLEDEFORM_ORIGIN_LOCAL (1<<0) | |
709 | |
710 #define MOD_UVPROJECT_MAX 10 | |
711 | |
712 typedef struct ShapeKeyModifierData { | |
713 ModifierData modifier; | |
714 } ShapeKeyModifierData; | |
715 | |
716 typedef struct SolidifyModifierData { | |
717 ModifierData modifier; | |
718 | |
719 char defgrp_name[64]; /* name of vertex group to use, MAX_VGROUP_NAME
*/ | |
720 float offset; /* new surface offset level*/ | |
721 float offset_fac; /* midpoint of the offset */ | |
722 float offset_fac_vg; /* factor for the minimum weight to use when vgr
oups are used, avoids 0.0 weights giving duplicate geometry */ | |
723 float crease_inner; | |
724 float crease_outer; | |
725 float crease_rim; | |
726 int flag; | |
727 short mat_ofs; | |
728 short mat_ofs_rim; | |
729 } SolidifyModifierData; | |
730 | |
731 #define MOD_SOLIDIFY_RIM (1<<0) | |
732 #define MOD_SOLIDIFY_EVEN (1<<1) | |
733 #define MOD_SOLIDIFY_NORMAL_CALC (1<<2) | |
734 #define MOD_SOLIDIFY_VGROUP_INV (1<<3) | |
735 #define MOD_SOLIDIFY_RIM_MATERIAL (1<<4) /* deprecated, used in do_version
s */ | |
736 | |
737 typedef struct ScrewModifierData { | |
738 ModifierData modifier; | |
739 struct Object *ob_axis; | |
740 int steps; | |
741 int render_steps; | |
742 int iter; | |
743 float screw_ofs; | |
744 float angle; | |
745 short axis; | |
746 short flag; | |
747 } ScrewModifierData; | |
748 | |
749 #define MOD_SCREW_NORMAL_FLIP (1 << 0) | |
750 #define MOD_SCREW_NORMAL_CALC (1 << 1) | |
751 #define MOD_SCREW_OBJECT_OFFSET (1 << 2) | |
752 // #define MOD_SCREW_OBJECT_ANGLE (1 << 4) | |
753 #define MOD_SCREW_SMOOTH_SHADING (1 << 5) | |
754 | |
755 typedef struct OceanModifierData { | |
756 ModifierData modifier; | |
757 ········ | |
758 struct Ocean *ocean; | |
759 struct OceanCache *oceancache; | |
760 ········ | |
761 int resolution; | |
762 int spatial_size; | |
763 ········ | |
764 float wind_velocity; | |
765 ········ | |
766 float damp; | |
767 float smallest_wave; | |
768 float depth; | |
769 ········ | |
770 float wave_alignment; | |
771 float wave_direction; | |
772 float wave_scale; | |
773 ········ | |
774 float chop_amount; | |
775 float foam_coverage; | |
776 float time; | |
777 ········ | |
778 int bakestart; | |
779 int bakeend; | |
780 ········ | |
781 char cachepath[1024]; // FILE_MAX | |
782 char foamlayername[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ | |
783 char cached; | |
784 char geometry_mode; | |
785 | |
786 char flag; | |
787 char refresh; | |
788 | |
789 short repeat_x; | |
790 short repeat_y; | |
791 | |
792 int seed; | |
793 | |
794 float size; | |
795 ········ | |
796 float foam_fade; | |
797 | |
798 int pad; | |
799 | |
800 } OceanModifierData; | |
801 | |
802 #define MOD_OCEAN_GEOM_GENERATE 0 | |
803 #define MOD_OCEAN_GEOM_DISPLACE 1 | |
804 #define MOD_OCEAN_GEOM_SIM_ONLY 2 | |
805 | |
806 #define MOD_OCEAN_REFRESH_RESET 1 | |
807 #define MOD_OCEAN_REFRESH_SIM 2 | |
808 #define MOD_OCEAN_REFRESH_ADD 4 | |
809 #define MOD_OCEAN_REFRESH_CLEAR_CACHE 8 | |
810 #define MOD_OCEAN_REFRESH_TOPOLOGY 16 | |
811 | |
812 #define MOD_OCEAN_GENERATE_FOAM 1 | |
813 #define MOD_OCEAN_GENERATE_NORMALS 2 | |
814 | |
815 | |
816 typedef struct WarpModifierData { | |
817 ModifierData modifier; | |
818 /* keep in sync with MappingInfoModifierData */ | |
819 struct Tex *texture; | |
820 struct Object *map_object; | |
821 char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ | |
822 int uvlayer_tmp; | |
823 int texmapping; | |
824 /* end MappingInfoModifierData */ | |
825 | |
826 struct Object *object_from; | |
827 struct Object *object_to; | |
828 struct CurveMapping *curfalloff; | |
829 char defgrp_name[64]; /* optional vertexgroup name, MA
X_VGROUP_NAME */ | |
830 float strength; | |
831 float falloff_radius; | |
832 char flag; /* not used yet */ | |
833 char falloff_type; | |
834 char pad[6]; | |
835 } WarpModifierData; | |
836 | |
837 #define MOD_WARP_VOLUME_PRESERVE 1 | |
838 | |
839 typedef enum { | |
840 eWarp_Falloff_None = 0, | |
841 eWarp_Falloff_Curve = 1, | |
842 eWarp_Falloff_Sharp = 2, /* PROP_SHARP */ | |
843 eWarp_Falloff_Smooth = 3, /* PROP_SMOOTH */ | |
844 eWarp_Falloff_Root = 4, /* PROP_ROOT */ | |
845 eWarp_Falloff_Linear = 5, /* PROP_LIN */ | |
846 eWarp_Falloff_Const = 6, /* PROP_CONST */ | |
847 eWarp_Falloff_Sphere = 7, /* PROP_SPHERE */ | |
848 /* PROP_RANDOM not used */ | |
849 } WarpModifierFalloff; | |
850 | |
851 typedef struct WeightVGEditModifierData { | |
852 ModifierData modifier; | |
853 | |
854 /* Note: I tried to keep everything logically ordered - provided the | |
855 * alignment constraints... */ | |
856 | |
857 char defgrp_name[64]; /* Name of vertex group to edit. MAX_VGROU
P_NAME. */ | |
858 | |
859 short edit_flags; /* Using MOD_WVG_EDIT_* flags. */ | |
860 short falloff_type; /* Using MOD_WVG_MAPPING_* defines. */ | |
861 float default_weight; /* Weight for vertices not in vgroup. */ | |
862 | |
863 /* Mapping stuff. */ | |
864 struct CurveMapping *cmap_curve; /* The custom mapping curve! */ | |
865 | |
866 /* The add/remove vertices weight thresholds. */ | |
867 float add_threshold, rem_threshold; | |
868 | |
869 /* Masking options. */ | |
870 float mask_constant; /* The global "influence", if no vgroup nor tex i
s used as mask. */ | |
871 /* Name of mask vertex group from which to get weight factors. */ | |
872 char mask_defgrp_name[64]; /* MAX_VGROUP_NAME */ | |
873 | |
874 /* Texture masking. */ | |
875 int mask_tex_use_channel; /* Which channel to use as we
ightf. */ | |
876 struct Tex *mask_texture; /* The texture. */ | |
877 struct Object *mask_tex_map_obj; /* Name of the map object. */ | |
878 /* How to map the texture (using MOD_DISP_MAP_* constants). */ | |
879 int mask_tex_mapping; | |
880 char mask_tex_uvlayer_name[64]; /* Name of the UV map. MAX_CUSTOMDATA
_LAYER_NAME */ | |
881 | |
882 /* Padding... */ | |
883 int pad_i1; | |
884 } WeightVGEditModifierData; | |
885 | |
886 /* WeightVGEdit flags. */ | |
887 /* Use parametric mapping. */ | |
888 //#define MOD_WVG_EDIT_MAP (1 << 0) | |
889 /* Use curve mapping. */ | |
890 //#define MOD_WVG_EDIT_CMAP (1 << 1) | |
891 /* Reverse weights (in the [0.0, 1.0] standard range). */ | |
892 //#define MOD_WVG_EDIT_REVERSE_WEIGHTS (1 << 2) | |
893 /* Add vertices with higher weight than threshold to vgroup. */ | |
894 #define MOD_WVG_EDIT_ADD2VG (1 << 3) | |
895 /* Remove vertices with lower weight than threshold from vgroup. */ | |
896 #define MOD_WVG_EDIT_REMFVG (1 << 4) | |
897 /* Clamp weights. */ | |
898 //#define MOD_WVG_EDIT_CLAMP (1 << 5) | |
899 | |
900 typedef struct WeightVGMixModifierData { | |
901 ModifierData modifier; | |
902 | |
903 /* XXX Note: I tried to keep everything logically ordered - provided the | |
904 * alignment constraints... */ | |
905 | |
906 char defgrp_name_a[64]; /* Name of vertex group to modify/weight
. MAX_VGROUP_NAME. */ | |
907 char defgrp_name_b[64]; /* Name of other vertex group to mix in.
MAX_VGROUP_NAME. */ | |
908 float default_weight_a; /* Default weight value for first vgroup
. */ | |
909 float default_weight_b; /* Default weight value to mix in. */ | |
910 char mix_mode; /* How second vgroups weights affect first
ones */ | |
911 char mix_set; /* What vertices to affect. */ | |
912 | |
913 char pad_c1[6]; | |
914 | |
915 /* Masking options. */ | |
916 float mask_constant; /* The global "influence", if no vgroup nor tex i
s used as mask. */ | |
917 /* Name of mask vertex group from which to get weight factors. */ | |
918 char mask_defgrp_name[64]; /* MAX_VGROUP_NAME */ | |
919 | |
920 /* Texture masking. */ | |
921 int mask_tex_use_channel; /* Which channel to use as we
ightf. */ | |
922 struct Tex *mask_texture; /* The texture. */ | |
923 struct Object *mask_tex_map_obj; /* Name of the map object. */ | |
924 int mask_tex_mapping; /* How to map the texture! */ | |
925 char mask_tex_uvlayer_name[64]; /* Name of the UV map. MAX_CUSTOMDATA
_LAYER_NAME. */ | |
926 | |
927 /* Padding... */ | |
928 int pad_i1; | |
929 } WeightVGMixModifierData; | |
930 | |
931 /* How second vgroup's weights affect first ones. */ | |
932 #define MOD_WVG_MIX_SET 1 /* Second weights replace weights. */ | |
933 #define MOD_WVG_MIX_ADD 2 /* Second weights are added to weights
. */ | |
934 #define MOD_WVG_MIX_SUB 3 /* Second weights are subtracted from
weights. */ | |
935 #define MOD_WVG_MIX_MUL 4 /* Second weights are multiplied with
weights. */ | |
936 #define MOD_WVG_MIX_DIV 5 /* Second weights divide weights. */ | |
937 #define MOD_WVG_MIX_DIF 6 /* Difference between second weights a
nd weights. */ | |
938 #define MOD_WVG_MIX_AVG 7 /* Average of both weights. */ | |
939 | |
940 /* What vertices to affect. */ | |
941 #define MOD_WVG_SET_ALL 1 /* Affect all vertices. */ | |
942 #define MOD_WVG_SET_A 2 /* Affect only vertices in first vgrou
p. */ | |
943 #define MOD_WVG_SET_B 3 /* Affect only vertices in second vgro
up. */ | |
944 #define MOD_WVG_SET_OR 4 /* Affect only vertices in one vgroup
or the other. */ | |
945 #define MOD_WVG_SET_AND 5 /* Affect only vertices in both vgroup
s. */ | |
946 | |
947 typedef struct WeightVGProximityModifierData { | |
948 ModifierData modifier; | |
949 | |
950 /* Note: I tried to keep everything logically ordered - provided the | |
951 * alignment constraints... */ | |
952 | |
953 char defgrp_name[64]; /* Name of vertex group to modify/weight.
MAX_VGROUP_NAME. */ | |
954 | |
955 /* Proximity modes. */ | |
956 int proximity_mode; | |
957 int proximity_flags; | |
958 | |
959 /* Target object from which to calculate vertices distances. */ | |
960 struct Object *proximity_ob_target; | |
961 | |
962 /* Masking options. */ | |
963 float mask_constant; /* The global "influence", if no vgroup nor tex i
s used as mask. */ | |
964 /* Name of mask vertex group from which to get weight factors. */ | |
965 char mask_defgrp_name[64]; /* MAX_VGROUP_NAME */ | |
966 | |
967 /* Texture masking. */ | |
968 int mask_tex_use_channel; /* Which channel to use as we
ightf. */ | |
969 struct Tex *mask_texture; /* The texture. */ | |
970 struct Object *mask_tex_map_obj; /* Name of the map object. */ | |
971 int mask_tex_mapping; /* How to map the texture! */ | |
972 char mask_tex_uvlayer_name[64]; /* Name of the UV Map. MAX_CUSTOMDATA
_LAYER_NAME. */ | |
973 | |
974 float min_dist, max_dist; /* Distances mapping to 0.0/1.0 weigh
ts. */ | |
975 | |
976 /* Put here to avoid breaking existing struct... */ | |
977 short falloff_type; /* Using MOD_WVG_MAPPING_* defines. *
/ | |
978 | |
979 /* Padding... */ | |
980 short pad_s1; | |
981 } WeightVGProximityModifierData; | |
982 | |
983 /* Modes of proximity weighting. */ | |
984 /* Dist from target object to affected object. */ | |
985 #define MOD_WVG_PROXIMITY_OBJECT 1 /* source vertex to ot
her location */ | |
986 /* Dist from target object to vertex. */ | |
987 #define MOD_WVG_PROXIMITY_GEOMETRY 2 /* source vertex to ot
her geometry */ | |
988 | |
989 /* Flags options for proximity weighting. */ | |
990 /* Use nearest vertices of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */ | |
991 #define MOD_WVG_PROXIMITY_GEOM_VERTS (1 << 0) | |
992 /* Use nearest edges of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */ | |
993 #define MOD_WVG_PROXIMITY_GEOM_EDGES (1 << 1) | |
994 /* Use nearest faces of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */ | |
995 #define MOD_WVG_PROXIMITY_GEOM_FACES (1 << 2) | |
996 | |
997 /* Defines common to all WeightVG modifiers. */ | |
998 /* Mapping modes. */ | |
999 #define MOD_WVG_MAPPING_NONE 0 | |
1000 #define MOD_WVG_MAPPING_CURVE 1 | |
1001 #define MOD_WVG_MAPPING_SHARP 2 /* PROP_SHARP */ | |
1002 #define MOD_WVG_MAPPING_SMOOTH 3 /* PROP_SMOOTH */ | |
1003 #define MOD_WVG_MAPPING_ROOT 4 /* PROP_ROOT */ | |
1004 /* PROP_LIN not used (same as NONE, here...). */ | |
1005 /* PROP_CONST not used. */ | |
1006 #define MOD_WVG_MAPPING_SPHERE 7 /* PROP_SPHERE */ | |
1007 #define MOD_WVG_MAPPING_RANDOM 8 /* PROP_RANDOM */ | |
1008 #define MOD_WVG_MAPPING_STEP 9 /* Median Step. */ | |
1009 | |
1010 /* Tex channel to be used as mask. */ | |
1011 #define MOD_WVG_MASK_TEX_USE_INT 1 | |
1012 #define MOD_WVG_MASK_TEX_USE_RED 2 | |
1013 #define MOD_WVG_MASK_TEX_USE_GREEN 3 | |
1014 #define MOD_WVG_MASK_TEX_USE_BLUE 4 | |
1015 #define MOD_WVG_MASK_TEX_USE_HUE 5 | |
1016 #define MOD_WVG_MASK_TEX_USE_SAT 6 | |
1017 #define MOD_WVG_MASK_TEX_USE_VAL 7 | |
1018 #define MOD_WVG_MASK_TEX_USE_ALPHA 8 | |
1019 | |
1020 /* Dynamic paint modifier flags */ | |
1021 #define MOD_DYNAMICPAINT_TYPE_CANVAS (1 << 0) | |
1022 #define MOD_DYNAMICPAINT_TYPE_BRUSH (1 << 1) | |
1023 | |
1024 typedef struct DynamicPaintModifierData { | |
1025 ModifierData modifier; | |
1026 | |
1027 struct DynamicPaintCanvasSettings *canvas; | |
1028 struct DynamicPaintBrushSettings *brush; | |
1029 int type; /* ui display: canvas / brush */ | |
1030 int pad; | |
1031 } DynamicPaintModifierData; | |
1032 | |
1033 /* Remesh modifier */ | |
1034 | |
1035 typedef enum RemeshModifierFlags { | |
1036 MOD_REMESH_FLOOD_FILL = 1, | |
1037 MOD_REMESH_SMOOTH_SHADING = 2, | |
1038 } RemeshModifierFlags; | |
1039 | |
1040 typedef enum RemeshModifierMode { | |
1041 /* blocky */ | |
1042 MOD_REMESH_CENTROID = 0, | |
1043 /* smooth */ | |
1044 MOD_REMESH_MASS_POINT = 1, | |
1045 /* keeps sharp edges */ | |
1046 MOD_REMESH_SHARP_FEATURES = 2, | |
1047 } RemeshModifierMode; | |
1048 | |
1049 typedef struct RemeshModifierData { | |
1050 ModifierData modifier; | |
1051 | |
1052 /* floodfill option, controls how small components can be | |
1053 * before they are removed */ | |
1054 float threshold; | |
1055 | |
1056 /* ratio between size of model and grid */ | |
1057 float scale; | |
1058 | |
1059 float hermite_num; | |
1060 | |
1061 /* octree depth */ | |
1062 char depth; | |
1063 | |
1064 char flag; | |
1065 char mode; | |
1066 char pad; | |
1067 } RemeshModifierData; | |
1068 | |
1069 /* Skin modifier */ | |
1070 | |
1071 typedef enum SkinModifierSymmetry { | |
1072 MOD_SKIN_SYMM_X = 1, | |
1073 MOD_SKIN_SYMM_Y = 2, | |
1074 MOD_SKIN_SYMM_Z = 4, | |
1075 } SkinModifierSymmetry; | |
1076 | |
1077 typedef enum SkinModifierFlags { | |
1078 MOD_SKIN_SMOOTH_SHADING = 1, | |
1079 } SkinModifierFlags; | |
1080 | |
1081 typedef struct SkinModifierData { | |
1082 ModifierData modifier; | |
1083 | |
1084 float branch_smoothing; | |
1085 | |
1086 /* enum SkinModifierFlags */ | |
1087 char flag; | |
1088 ········ | |
1089 /* enum SkinModifierSymmetry */ | |
1090 char symmetry_axes; | |
1091 | |
1092 char pad[2]; | |
1093 } SkinModifierData; | |
1094 | |
1095 #endif | |
LEFT | RIGHT |