Blender V4.3
DNA_particle_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2007 by Janne Karhu. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "DNA_ID.h"
12#include "DNA_boid_types.h"
13#include "DNA_defs.h"
14
15struct AnimData;
16
17typedef struct HairKey {
19 float co[3];
21 float time;
23 float weight;
25 short editflag;
26 char _pad[2];
27 float world_co[3];
29
30typedef struct ParticleKey { /* when changed update size of struct to copy_particleKey()!! */
32 float co[3];
34 float vel[3];
36 float rot[4];
38 float ave[3];
40 float time;
42
43typedef struct BoidParticle {
44 struct Object *ground;
45 struct BoidData data;
46 float gravity[3];
47 float wander[3];
48 char _pad0[4];
50
55
57typedef struct ChildParticle {
59 int num;
60 int parent;
62 int pa[4];
64 float w[4];
66 float fuv[4], foffset;
67 char _pad0[4];
69
70typedef struct ParticleTarget {
72 struct Object *ob;
73 int psys;
74 short flag, mode;
75 float time, duration;
77
78typedef struct ParticleDupliWeight {
80 struct Object *ob;
81 short count;
82 short flag;
84 short index;
85 char _pad0[2];
87
88typedef struct ParticleData {
91
94
97
100
103
106
115 float dietime;
116
122 int num;
128
130 float fuv[4], foffset;
131 /* face normal for volume emission. */
132
134 float size;
135
138 char _pad[4];
139
141 short flag;
143 short alive;
145
158
160enum {
168};
169
171enum {
174};
175
176typedef struct ParticleSettings {
178 struct AnimData *adt;
179
182
185
186 int flag;
187 char _pad1[4];
189 /* physics modes */
191 int draw;
194 char _pad2[4];
196 /* number of path segments, power of 2 except */
199
200 /* adaptive path rendering */
202
204 short rotfrom DNA_DEPRECATED;
206
207 /* billboards */
208 short bb_align, bb_uv_split, bb_anim, bb_split_offset DNA_DEPRECATED;
210
211 /* draw color */
213
214 /* time and emission */
220 char _pad0[6];
221
222 /* initial velocity factors */
224 float ob_vel[3];
226 /* physical properties */
228 /* global physical properties */
230 /* length */
232 /* children */
234 char _pad3[4];
238 /* clumping */
240 /* kink */
244 char _pad4[4];
246 /* rough */
250 /* length */
252 /* parting */
255 /* branching */
257 /* drawing stuff */
258 float draw_line[2];
261 /* keyed particles */
266
267 /* hair dynamics */
269
271 struct MTex *mtex[18];
272
275 struct Collection *force_group DNA_DEPRECATED; /* deprecated */
277 struct Object *bb_ob;
279 struct Ipo *ipo DNA_DEPRECATED;
282
283 /* Evaluated mesh support. */
285 char _pad5[2];
286
287 /* hair shape */
289 char _pad6[2];
290
291 float twist;
292 char _pad8[4];
293
294 /* hair thickness shape */
295 float shape;
297
299 void *_pad7;
301
302typedef struct ParticleSystem {
303 /* note1: make sure all (run-time) are NULL's in 'copy_particlesystem' XXX,
304 * this function is no more! - need to investigate. */
305
306 /* note2: make sure any uses of this struct in DNA are
307 * accounted for in 'BKE_object_copy_particlesystems'. */
308
310
313
318
322 void (*free_edit)(struct PTCacheEdit *edit);
323
330
335
337
340
342 struct Object *parent;
343
346
348 char name[64];
349
351 float imat[4][4];
355 /* NOTE: Recalc is one of ID_RECALC_PSYS_ALL flags.
356 *
357 * TODO(sergey): Use #ParticleSettings.id.recalc instead of this duplicated flag somehow. */
360 char _pad1[6];
361
363 char bb_uvname[3][68] DNA_DEPRECATED;
364
365 char _pad2[4];
366 /* if you change these remember to update array lengths to PSYS_TOT_VG! */
368 short vgroup[13], vg_neg, rt3;
369 char _pad3[6];
370
371 /* point cache */
374
376
379
381 struct KDTree_3d *tree;
384
386
388 float dt_frac;
391
393
404
405typedef enum eParticleDrawFlag {
406 PART_DRAW_VEL = (1 << 0),
408 PART_DRAW_SIZE = (1 << 2),
411 PART_DRAW_EMITTER = (1 << 3), /* DEPRECATED */
412#endif
416 /* PART_DRAW_BB_LOCK = (1 << 7), */ /* DEPRECATED */
417 /* used with billboards */ /* DEPRECATED */
418 PART_DRAW_ROTATE_OB = (1 << 7), /* used with instance object/collection */
420 PART_DRAW_NUM = (1 << 9),
421 PART_DRAW_RAND_GR = (1 << 10),
424 PART_DRAW_MAT_COL = (1 << 13), /* deprecated, but used in do_versions */
427 PART_DRAW_NO_SCALE_OB = (1 << 16), /* used with instance object/collection */
431
437enum {
439 /* REACTOR type currently unused */
440 /* PART_REACTOR = 1, */
442 PART_FLUID = 3, /* Deprecated (belonged to ELBEEM). */
452};
453
455enum {
456 /* PARTICLE_TYPE_NONE = (0 << 0), */ /* UNUSED */
457 /* PARTICLE_TYPE_NEW = (1 << 0), */ /* UNUSED */
463 /* PARTICLE_TYPE_INVALID = (1 << 30), */ /* UNUSED */
464};
465
467enum {
470
471 // PART_LOOP = 1 << 2, /* not used anymore */
472
473 /* For dope-sheet. */
475
478
480 PART_UNBORN = 1 << 5,
482 PART_DIED = 1 << 6,
483
484 PART_TRAND = 1 << 7,
486 PART_EDISTR = 1 << 8,
487
493 PART_SIZE_DEFL = 1 << 13,
495 PART_ROT_DYN = 1 << 14,
496
498
499 PART_SIZEMASS = 1 << 16,
500
501 // PART_ABS_TIME = 1 << 17,
502 // PART_GLOB_TIME = 1 << 18,
503
504 PART_BOIDS_2D = 1 << 19,
505
506 // PART_BRANCHING = 1 << 20,
507 // PART_ANIM_BRANCHING = 1 << 21,
509
512
515 // PART_CHILD_RENDER = 1 << 29, /* UNUSED */
517
518};
519
521enum {
525 // PART_FROM_PARTICLE = 3, /* Deprecated. */
527};
528
530enum {
534};
535
537enum {
543};
544
554
562
567
569enum {
574};
575
577enum {
580};
581
583enum {
594 PART_DRAW_BB = 9, /* Deprecated. */
596};
597
599enum {
604};
605
607enum {
617};
618
620enum {
628};
629
631enum {
635};
636
638enum {
641};
642
644enum {
645 PSYS_CURRENT = 1 << 0,
649 // PSYS_ENABLED = 1 << 4, /* Deprecated. */
652 // PSYS_DRAWING = 1 << 6, /* Deprecated. */
653 // PSYS_USE_IMAT = 1 << 7, /* Deprecated. */
655 PSYS_DELETE = 1 << 8,
657 PSYS_KEYED = 1 << 10,
658 PSYS_EDITED = 1 << 11,
659 // PSYS_PROTECT_CACHE = 1 << 12, /* Deprecated. */
660 PSYS_DISABLED = 1 << 13,
664};
665
667enum {
668 PARS_UNEXIST = 1 << 0,
669 PARS_NO_DISP = 1 << 1,
670 // PARS_STICKY = 1 << 2, /* deprecated */
671 PARS_REKEY = 1 << 3,
672};
673
675enum {
676 PARS_KILLED = 0, /* Deprecated. */
681};
682
684enum {
686};
687
689enum {
691};
692
694enum {
708};
709
711enum {
714};
715
717enum {
721};
722
725 /* init */
726 PAMAP_TIME = (1 << 0), /* emission time */
727 PAMAP_LIFE = (1 << 1), /* life time */
728 PAMAP_DENS = (1 << 2), /* density */
729 PAMAP_SIZE = (1 << 3), /* physical size */
731 /* reset */
732 PAMAP_IVEL = (1 << 5), /* initial velocity */
733 /* physics */
734 PAMAP_FIELD = (1 << 6), /* force fields */
735 PAMAP_GRAVITY = (1 << 10),
736 PAMAP_DAMP = (1 << 11),
738 /* children */
739 PAMAP_CLUMP = (1 << 7),
740 PAMAP_KINK_FREQ = (1 << 8),
741 PAMAP_KINK_AMP = (1 << 12),
742 PAMAP_ROUGH = (1 << 9),
743 PAMAP_LENGTH = (1 << 4),
744 PAMAP_TWIST = (1 << 13),
ID and Library types, which are fundamental for SDNA.
@ PART_DRAW_COL_NONE
@ PART_DRAW_COL_ACC
@ PART_DRAW_COL_MAT
@ PART_DRAW_COL_VEL
eParticleShapeFlag
@ PART_SHAPE_CLOSE_TIP
@ PART_FROM_VOLUME
@ PART_FROM_CHILD
@ PART_FROM_VERT
@ PART_FROM_FACE
@ PART_DUPLIW_CURRENT
@ PTARGET_CURRENT
@ PTARGET_VALID
@ PTARGET_MODE_ENEMY
@ PTARGET_MODE_FRIEND
@ PTARGET_MODE_NEUTRAL
@ PART_UNBORN
@ PART_CHILD_LONG_HAIR
@ PART_REACT_STA_END
@ PART_BOIDS_2D
@ PART_EDISTR
@ PART_SIZEMASS
@ PART_HAIR_REGROW
@ PART_ROT_DYN
@ PART_CHILD_GUIDE
@ PART_DIE_ON_COL
@ PART_CHILD_EFFECT
@ PART_HIDE_ADVANCED_HAIR
@ PART_SIZE_DEFL
@ PART_HAIR_BSPLINE
@ PART_DIED
@ PART_GRID_HEXAGONAL
@ PART_DS_EXPAND
@ PART_GRID_INVERT
@ PART_SELF_EFFECT
@ PART_ROTATIONS
@ PART_REACT_MULTIPLE
@ PART_TRAND
@ SPH_SOLVER_DDR
@ SPH_SOLVER_CLASSICAL
@ PARTICLE_TYPE_BUBBLE
@ PARTICLE_TYPE_DELETE
@ PARTICLE_TYPE_TRACER
@ PARTICLE_TYPE_FOAM
@ PARTICLE_TYPE_SPRAY
@ PART_DRAW_CIRC
@ PART_DRAW_CROSS
@ PART_DRAW_AXIS
@ PART_DRAW_PATH
@ PART_DRAW_LINE
@ PART_DRAW_NOT
@ PART_DRAW_GR
@ PART_DRAW_BB
@ PART_DRAW_OB
@ PART_DRAW_REND
@ PART_DRAW_HALO
@ PART_DRAW_DOT
@ PART_FLUID_FLIP
@ PART_EMITTER
@ PART_FLUID_BUBBLE
@ PART_FLUID_SPRAYBUBBLE
@ PART_FLUID_TRACER
@ PART_FLUID
@ PART_FLUID_FOAM
@ PART_FLUID_SPRAYFOAMBUBBLE
@ PART_FLUID_SPRAYFOAM
@ PART_HAIR
@ PART_FLUID_SPRAY
@ PART_FLUID_FOAMBUBBLE
@ PARS_REKEY
@ PARS_NO_DISP
@ PARS_UNEXIST
struct ParticleSettings ParticleSettings
@ PART_TIME_AUTOSF
struct SPHFluidSettings SPHFluidSettings
eParticleDrawFlag
@ PART_DRAW_WHOLE_GR
@ PART_DRAW_REN_STRAND
@ PART_DRAW_SIZE
@ PART_DRAW_VEL
@ PART_DRAW_GLOBAL_OB
@ PART_DRAW_PARENT
@ PART_DRAW_NUM
@ PART_DRAW_NO_SCALE_OB
@ PART_DRAW_COUNT_GR
@ PART_DRAW_MAT_COL
@ PART_DRAW_HAIR_GRID
@ PART_ABS_PATH_TIME
@ PART_DRAW_REN_ADAPT
@ PART_DRAW_HEALTH
@ PART_DRAW_RAND_GR
@ PART_DRAW_VEL_LENGTH
@ PART_DRAW_GUIDE_HAIRS
@ PART_DRAW_ROTATE_OB
struct ParticleTarget ParticleTarget
@ PSYS_VG_ROUGHE
@ PSYS_VG_SIZE
@ PSYS_VG_ROT
@ PSYS_VG_LENGTH
@ PSYS_VG_ROUGH1
@ PSYS_VG_DENSITY
@ PSYS_VG_CLUMP
@ PSYS_VG_VEL
@ PSYS_VG_TAN
@ PSYS_VG_KINK
@ PSYS_VG_EFFECTOR
@ PSYS_VG_ROUGH2
@ PSYS_VG_TWIST
@ PART_EVENT_NEAR
@ PART_EVENT_DEATH
@ PART_EVENT_COLLIDE
struct ParticleKey ParticleKey
struct ParticleData ParticleData
eParticleTextureInfluence
@ PAMAP_DENS
@ PAMAP_FIELD
@ PAMAP_CHILD
@ PAMAP_KINK_FREQ
@ PAMAP_PHYSICS
@ PAMAP_TWIST
@ PAMAP_DAMP
@ PAMAP_SIZE
@ PAMAP_IVEL
@ PAMAP_INIT
@ PAMAP_GRAVITY
@ PAMAP_LIFE
@ PAMAP_KINK_AMP
@ PAMAP_TIME
@ PAMAP_CLUMP
@ PAMAP_LENGTH
@ PAMAP_ROUGH
@ PART_INT_VERLET
@ PART_INT_MIDPOINT
@ PART_INT_RK4
@ PART_INT_EULER
@ PARS_ALIVE
@ PARS_KILLED
@ PARS_DYING
@ PARS_DEAD
@ PARS_UNBORN
struct BoidParticle BoidParticle
@ PART_CHILD_PARTICLES
@ PART_CHILD_FACES
@ PART_KINK_BRAID
@ PART_KINK_WAVE
@ PART_KINK_SPIRAL
@ PART_KINK_RADIAL
@ PART_KINK_CURL
@ PART_KINK_NO
struct ParticleDupliWeight ParticleDupliWeight
@ PART_AVE_GLOBAL_X
@ PART_AVE_GLOBAL_Z
@ PART_AVE_VERTICAL
@ PART_AVE_VELOCITY
@ PART_AVE_GLOBAL_Y
@ PART_AVE_HORIZONTAL
@ PART_AVE_RAND
struct ParticleSystem ParticleSystem
struct ChildParticle ChildParticle
@ PART_ROT_VEL
@ PART_ROT_OB_Y
@ PART_ROT_NOR_TAN
@ PART_ROT_OB_Z
@ PART_ROT_GLOB_Y
@ PART_ROT_GLOB_X
@ PART_ROT_NOR
@ PART_ROT_OB_X
@ PART_ROT_GLOB_Z
@ PSYS_TOT_VG
struct ParticleSpring ParticleSpring
@ PART_PHYS_FLUID
@ PART_PHYS_NEWTON
@ PART_PHYS_KEYED
@ PART_PHYS_BOIDS
@ PART_PHYS_NO
struct HairKey HairKey
@ SPH_FAC_DENSITY
@ SPH_CURRENT_REST_LENGTH
@ SPH_FAC_REST_LENGTH
@ SPH_FAC_REPULSION
@ SPH_FAC_VISCOSITY
@ SPH_VISCOELASTIC_SPRINGS
@ SPH_FAC_RADIUS
eParticleChildFlag
@ PART_CHILD_USE_TWIST_CURVE
@ PART_CHILD_USE_CLUMP_CURVE
@ PART_CHILD_USE_CLUMP_NOISE
@ PART_CHILD_USE_ROUGH_CURVE
@ PSYS_CURRENT
@ PSYS_DISABLED
@ PSYS_HAIR_DYNAMICS
@ PSYS_EDITED
@ PSYS_DELETE
@ PSYS_HAIR_DONE
@ PSYS_GLOBAL_HAIR
@ PSYS_HAIR_UPDATED
@ PSYS_KEYED_TIMING
@ PSYS_OB_ANIM_RESTORE
@ PSYS_SHARED_CACHES
@ PSYS_KEYED
@ PART_DISTR_GRID
@ PART_DISTR_RAND
@ PART_DISTR_JIT
#define DNA_DEPRECATED_ALLOW
struct Object * ground
float world_co[3]
Definition DNA_ID.h:413
BoidParticle * boid
ParticleKey state
ParticleKey prev_state
ParticleKey * keys
struct ParticleDupliWeight * prev
struct ParticleDupliWeight * next
struct CurveMapping * clumpcurve
struct PartDeflect * pd2
struct Collection * collision_group
struct Collection * instance_collection
struct AnimData * adt
struct Object * bb_ob
struct CurveMapping * roughcurve
struct CurveMapping * twistcurve
struct Ipo *ipo DNA_DEPRECATED
struct BoidSettings * boids
struct EffectorWeights * effector_weights
struct MTex * mtex[18]
struct PartDeflect * pd
struct ListBase instance_weights
struct Collection *force_group DNA_DEPRECATED
short rotfrom DNA_DEPRECATED
struct Object * instance_object
struct SPHFluidSettings * fluid
unsigned int delete_flag
unsigned int particle_index[2]
ParticleSpring * fluid_springs
ChildParticle * child
struct PTCacheEdit * edit
struct ListBase ptcaches
ParticleData * particles
struct ListBase targets
ParticleSettings * part
struct ListBase * effectors
struct ParticleSystem * next
struct PointCache * pointcache
struct BVHTree * bvhtree
struct ClothModifierData * clmd
struct Object * target_ob
struct ParticleSystem * prev
struct LatticeDeformData * lattice_deform_data
struct ParticleCacheKey ** childcache
struct Mesh * hair_in_mesh
struct KDTree_3d * tree
struct Object * parent
struct ParticleSystem * orig_psys
struct Mesh * hair_out_mesh
struct ParticleDrawData * pdd
struct ParticleCacheKey ** pathcache
char bb_uvname[3][68] DNA_DEPRECATED
void(* free_edit)(struct PTCacheEdit *edit)
struct Object * ob
struct ParticleTarget * prev
struct ParticleTarget * next