Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h1
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h4
-rw-r--r--source/blender/makesdna/DNA_ipo_types.h34
-rw-r--r--source/blender/makesdna/DNA_material_types.h28
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h3
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h50
-rw-r--r--source/blender/makesdna/DNA_object_force.h48
-rw-r--r--source/blender/makesdna/DNA_object_types.h7
-rw-r--r--source/blender/makesdna/DNA_particle_types.h432
-rw-r--r--source/blender/makesdna/DNA_scene_types.h51
-rw-r--r--source/blender/makesdna/DNA_texture_types.h4
-rw-r--r--source/blender/makesdna/intern/makesdna.c2
12 files changed, 653 insertions, 11 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index d939d0dc879..57aec75700f 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -183,6 +183,7 @@ typedef struct PreviewImage {
#define ID_SCRIPT MAKE_ID2('P', 'Y')
#define ID_NT MAKE_ID2('N', 'T')
#define ID_BR MAKE_ID2('B', 'R')
+#define ID_PA MAKE_ID2('P', 'A')
/* NOTE! Fake IDs, needed for g.sipo->blocktype or outliner */
#define ID_SEQ MAKE_ID2('S', 'Q')
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 1c1676ba277..249a4a5c36c 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -67,7 +67,8 @@ typedef struct CustomData {
#define CD_PROP_FLT 10
#define CD_PROP_INT 11
#define CD_PROP_STR 12
-#define CD_NUMTYPES 13
+#define CD_ORIGSPACE 13 /* for modifier stack face location mapping */
+#define CD_NUMTYPES 14
/* Bits for CustomDataMask */
#define CD_MASK_MVERT (1 << CD_MVERT)
@@ -83,6 +84,7 @@ typedef struct CustomData {
#define CD_MASK_PROP_FLT (1 << CD_PROP_FLT)
#define CD_MASK_PROP_INT (1 << CD_PROP_INT)
#define CD_MASK_PROP_STR (1 << CD_PROP_STR)
+#define CD_MASK_ORIGSPACE (1 << CD_ORIGSPACE)
/* CustomData.flag */
diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h
index 2b943c2c23e..8ec412a3534 100644
--- a/source/blender/makesdna/DNA_ipo_types.h
+++ b/source/blender/makesdna/DNA_ipo_types.h
@@ -69,8 +69,8 @@ typedef short IPO_Channel;
/* ******************** */
-#define OB_TOTIPO 29
-#define OB_TOTNAM 29
+#define OB_TOTIPO 30
+#define OB_TOTNAM 30
#define OB_LOC_X 1
#define OB_LOC_Y 2
@@ -107,6 +107,7 @@ typedef short IPO_Channel;
#define OB_PD_SDAMP 27
#define OB_PD_RDAMP 28
#define OB_PD_PERM 29
+#define OB_PD_FMAXD 30
/* exception: driver channel, for bone driver only */
#define OB_ROT_DIFF 100
@@ -354,6 +355,35 @@ typedef short IPO_Channel;
#define FLUIDSIM_ACTIVE 9
+/* ******************** */
+/* particle ipos */
+#define PART_TOTIPO 19
+#define PART_TOTNAM 19
+
+#define PART_EMIT_FREQ 1
+#define PART_EMIT_LIFE 2
+#define PART_EMIT_VEL 3
+#define PART_EMIT_AVE 4
+#define PART_EMIT_SIZE 5
+
+#define PART_AVE 6
+#define PART_SIZE 7
+#define PART_DRAG 8
+#define PART_BROWN 9
+#define PART_DAMP 10
+#define PART_LENGTH 11
+#define PART_CLUMP 12
+
+#define PART_GRAV_X 13
+#define PART_GRAV_Y 14
+#define PART_GRAV_Z 15
+
+#define PART_KINK_AMP 16
+#define PART_KINK_FREQ 17
+#define PART_KINK_SHAPE 18
+
+#define PART_BB_TILT 19
+
/* these are IpoCurve specific */
/* **************** IPO ********************* */
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 3e2197f2d83..c7301d4f974 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -85,6 +85,7 @@ typedef struct Material {
short flarec, starc, linec, ringc;
float hasize, flaresize, subsize, flareboost;
float strand_sta, strand_end, strand_ease;
+ char strand_uvname[32];
float sbias; /* shadow bias */
float shad_alpha, padf; /* in use for irregular shadowbuffer */
@@ -189,8 +190,9 @@ typedef struct Material {
#define MA_NORMAP_TANG 0x8000000
#define MA_GROUP_NOLAY 0x10000000
#define MA_FACETEXTURE_ALPHA 0x20000000
+#define MA_STR_B_UNITS 0x40000000
-#define MA_MODE_MASK 0x1fffffff /* all valid mode bits */
+#define MA_MODE_MASK 0x4fffffff /* all valid mode bits */
/* ray mirror fadeout */
#define MA_RAYMIR_FADETOSKY 0
@@ -274,6 +276,30 @@ typedef struct Material {
#define MAP_WARP 8192
#define MAP_LAYER 16384
+/* mapto for halo */
+//#define MAP_HA_COL 1
+//#define MAP_HA_ALPHA 128
+//#define MAP_HA_HAR 256
+//#define MAP_HA_SIZE 2
+//#define MAP_HA_ADD 64
+
+/* pmapto */
+/* init */
+#define MAP_PA_INIT 31
+#define MAP_PA_TIME 1
+#define MAP_PA_LIFE 2
+#define MAP_PA_DENS 4
+#define MAP_PA_SIZE 8
+#define MAP_PA_LENGTH 16
+/* reset */
+#define MAP_PA_IVEL 32
+/* physics */
+#define MAP_PA_PVEL 64
+/* path cache */
+#define MAP_PA_CACHE 384
+#define MAP_PA_CLUMP 128
+#define MAP_PA_KINK 256
+
/* pr_type */
#define MA_FLAT 0
#define MA_SPHERE 1
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index 68d9bb245cf..1c038c51298 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -99,6 +99,9 @@ typedef struct MStringProperty{
char s[256];
} MStringProperty;
+typedef struct OrigSpaceFace {
+ float uv[4][2];
+} OrigSpaceFace;
/* Multiresolution modeling */
typedef struct MultiresCol {
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 0802fbf0e40..982df45e77a 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -29,6 +29,9 @@ typedef enum ModifierType {
eModifierType_Smooth,
eModifierType_Cast,
eModifierType_MeshDeform,
+ eModifierType_ParticleSystem,
+ eModifierType_ParticleInstance,
+ eModifierType_Explode,
NUM_MODIFIER_TYPES
} ModifierType;
@@ -385,4 +388,51 @@ typedef struct MeshDeformModifierData {
float bindmat[4][4]; /* matrix of cage at binding time */
} MeshDeformModifierData;
+typedef enum {
+ eParticleSystemFlag_Loaded = (1<<0),
+ eParticleSystemFlag_Pars = (1<<1),
+ eParticleSystemFlag_FromCurve = (1<<2),
+ eParticleSystemFlag_DM_changed = (1<<3),
+ eParticleSystemFlag_Disabled = (1<<4),
+ eParticleSystemFlag_psys_updated = (1<<5),
+} ParticleSystemModifierFlag;
+
+typedef struct ParticleSystemModifierData {
+ ModifierData modifier;
+ struct ParticleSystem *psys;
+ struct DerivedMesh *dm;
+ short flag, rt[3];
+} ParticleSystemModifierData;
+
+typedef enum {
+ eParticleInstanceFlag_Parents = (1<<0),
+ eParticleInstanceFlag_Children = (1<<1),
+ eParticleInstanceFlag_Path = (1<<2),
+ eParticleInstanceFlag_Unborn = (1<<3),
+ eParticleInstanceFlag_Alive = (1<<4),
+ eParticleInstanceFlag_Dead = (1<<5),
+} ParticleInstanceModifierFlag;
+
+typedef struct ParticleInstanceModifierData {
+ ModifierData modifier;
+ struct Object *ob;
+ short psys, flag, rt[2];
+} ParticleInstanceModifierData;
+
+typedef enum {
+ eExplodeFlag_CalcFaces = (1<<0),
+ //eExplodeFlag_PaSize = (1<<1),
+ eExplodeFlag_EdgeSplit = (1<<2),
+ eExplodeFlag_Unborn = (1<<3),
+ eExplodeFlag_Alive = (1<<4),
+ eExplodeFlag_Dead = (1<<5),
+} ExplodeModifierFlag;
+
+typedef struct ExplodeModifierData {
+ ModifierData modifier;
+ int *facepa;
+ short flag, vgroup;
+ float protect;
+} ExplodeModifierData;
+
#endif
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 88d45f0dbd8..df17454adeb 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -41,19 +41,35 @@ typedef struct PartDeflect {
short deflect; /* Deflection flag - does mesh deflect particles*/
short forcefield; /* Force field type, do the vertices attract / repel particles ? */
short flag; /* general settings flag */
- short pad;
+ short falloff; /* fall-off type*/
float pdef_damp; /* Damping factor for particle deflection */
float pdef_rdamp; /* Random element of damping for deflection */
float pdef_perm; /* Chance of particle passing through mesh */
+ float pdef_frict; /* Friction factor for particle deflection */
+ float pdef_rfrict; /* Random element of friction for deflection */
float f_strength; /* The strength of the force (+ or - ) */
float f_power; /* The power law - real gravitation is 2 (square) */
+ float f_dist;
+ float f_damp; /* The dampening factor, currently only for harmonic force */
float maxdist; /* if indicated, use this maximum */
+ float mindist; /* if indicated, use this minimum */
+ float maxrad; /* radial versions of above */
+ float minrad;
+ float f_power_r; /* radial fall-off power*/
float pdef_sbdamp; /* Damping factor for softbody deflection */
float pdef_sbift; /* inner face thickness for softbody deflection */
float pdef_sboft; /* outer face thickness for softbody deflection */
+
+ /* variables for guide curve */
+ float clump_fac, clump_pow;
+ float kink_freq, kink_shape, kink_amp, free_end;
+
+ float tex_nabla;
+ short tex_mode, kink, kink_axis, rt2;
+ struct Tex *tex; /* Texture of the texture effector */
} PartDeflect;
@@ -62,6 +78,8 @@ typedef struct SBVertex {
} SBVertex;
typedef struct SoftBody {
+ struct ParticleSystem *particles; /* particlesystem softbody */
+
/* dynamic data */
int totpoint, totspring;
struct BodyPoint *bpoint; /* not saved in file */
@@ -96,8 +114,10 @@ typedef struct SoftBody {
int interval;
short local, solverflags; /* local==1: use local coords for baking */
+ /* -- these must be kept for backwards compatibility -- */
SBVertex **keys; /* array of size totpointkey */
int totpointkey, totkey; /* if totpointkey != totpoint or totkey!- (efra-sfra)/interval -> free keys */
+ /* ---------------------------------------------------- */
float secondspring;
/* self collision*/
@@ -122,11 +142,36 @@ typedef struct SoftBody {
#define PFIELD_MAGNET 3
#define PFIELD_WIND 4
#define PFIELD_GUIDE 5
+#define PFIELD_TEXTURE 6
+#define PFIELD_HARMONIC 7
+#define PFIELD_NUCLEAR 8
+#define PFIELD_MDIPOLE 9
+
/* pd->flag: various settings */
#define PFIELD_USEMAX 1
#define PDEFLE_DEFORM 2
#define PFIELD_GUIDE_PATH_ADD 4
+#define PFIELD_PLANAR 8
+#define PDEFLE_KILL_PART 16
+#define PFIELD_POSZ 32
+#define PFIELD_TEX_OBJECT 64
+#define PFIELD_TEX_2D 128
+#define PFIELD_USEMIN 256
+#define PFIELD_USEMAXR 512
+#define PFIELD_USEMINR 1024
+
+/* pd->falloff */
+#define PFIELD_FALL_SPHERE 0
+#define PFIELD_FALL_TUBE 1
+#define PFIELD_FALL_CONE 2
+//reserved for near future
+//#define PFIELD_FALL_INSIDE 3
+
+/* pd->tex_mode */
+#define PFIELD_TEX_RGB 0
+#define PFIELD_TEX_GRAD 1
+#define PFIELD_TEX_CURL 2
/* ob->softflag */
#define OB_SB_ENABLE 1
@@ -142,6 +187,7 @@ typedef struct SoftBody {
#define OB_SB_FACECOLL 1024
#define OB_SB_EDGECOLL 2048
#define OB_SB_COLLFINAL 4096
+#define OB_SB_PROTECT_CACHE 8192
/* sb->solverflags */
#define SBSO_MONITOR 1
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index cb4aa42a847..5b875780f8b 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -54,6 +54,7 @@ struct bConstraintChannel;
struct PartDeflect;
struct SoftBody;
struct FluidsimSettings;
+struct ParticleSystem;
struct DerivedMesh;
typedef struct bDeformGroup {
@@ -181,6 +182,7 @@ typedef struct Object {
ListBase constraints;
ListBase nlastrips;
ListBase hooks;
+ ListBase particlesystem; /* particle systems */
struct PartDeflect *pd; /* particle deflector/attractor/collision data */
struct SoftBody *soft; /* if exists, saved in file */
@@ -195,7 +197,7 @@ typedef struct Object {
short recalco, pad4; /* recalco for temp storage of ob->recalc, bad design warning */
struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */
-
+
struct DerivedMesh *derivedDeform, *derivedFinal;
int lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */
int pad;
@@ -266,7 +268,7 @@ extern Object workob;
#define OB_OFFS_LOCAL 1
#define OB_QUAT 2
#define OB_NEG_SCALE 4
-#define OB_DUPLI (8+16+256+512)
+#define OB_DUPLI (8+16+256+512+2048)
#define OB_DUPLIFRAMES 8
#define OB_DUPLIVERTS 16
#define OB_DUPLIROT 32
@@ -275,6 +277,7 @@ extern Object workob;
#define OB_DUPLIGROUP 256
#define OB_DUPLIFACES 512
#define OB_DUPLIFACES_SCALE 1024
+#define OB_DUPLIPARTS 2048
/* (short) ipoflag */
#define OB_DRAWKEY 1
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
new file mode 100644
index 00000000000..f41a0d63142
--- /dev/null
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -0,0 +1,432 @@
+/* DNA_particle_types.h
+ *
+ *
+ * $Id: DNA_particle_types.h $
+ *
+ * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2007 by Janne Karhu.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+
+#ifndef DNA_PARTICLE_TYPES_H
+#define DNA_PARTICLE_TYPES_H
+
+#include "DNA_ID.h"
+
+typedef struct HairKey {
+ float co[3]; /* location of hair vertex */
+ float time; /* time along hair, default 0-100 */
+ float weight; /* softbody weight */
+ short editflag; /* saved particled edit mode flags */
+ short pad;
+} HairKey;
+
+typedef struct ParticleKey { /* when changed update size of struct to copy_particleKey()!! */
+ float co[3]; /* location */
+ float vel[3]; /* velocity */
+ float rot[4]; /* rotation quaternion */
+ float ave[3]; /* angular velocity */
+ float time; /* when this key happens */
+} ParticleKey;
+
+/* Child particles are created around or between parent particles */
+typedef struct ChildParticle {
+ int num, parent; /* num is face index on the final derived mesh */
+ int pa[4]; /* nearest particles to the child, used for the interpolation */
+ float w[4]; /* interpolation weights for the above particles */
+ float fuv[4], foffset; /* face vertex weights and offset */
+ float rand[3];
+} ChildParticle;
+
+/* Everything that's non dynamic for a particle: */
+typedef struct ParticleData {
+ struct Object *stick_ob;/* object that particle sticks to when dead */
+
+ ParticleKey state; /* normally current global coordinates or */
+ /* in sticky object space if dead & sticky */
+
+ HairKey *hair; /* hair vertices */
+
+ ParticleKey *keys; /* keyed states */
+
+ float i_rot[4],r_rot[4];/* initial & random values (i_rot should be removed as it's not used anymore)*/
+ float r_ave[3],r_ve[3];
+
+ float fuv[4], foffset; /* coordinates on face/edge number "num" and depth along*/
+ /* face normal for volume emission */
+
+ float time, lifetime; /* dietime is not nescessarily time+lifetime as */
+ float dietime; /* particles can die unnaturally (collision) */
+
+ float bank; /* banking angle for boids */
+
+ float size, sizemul; /* size and multiplier so that we can update size when ever */
+
+ int num; /* index to vert/edge/face */
+ int num_dmcache; /* index to derived mesh data (face) to avoid slow lookups */
+ int pad;
+
+ int totkey;
+ int bpi; /* softbody body point start index */
+
+ short flag;
+ short alive; /* the life state of a particle */
+ short loop; /* how many times particle life has looped */
+ short rt2;
+} ParticleData;
+
+typedef struct ParticleSettings {
+ ID id;
+
+ int flag;
+ short type, from, distr;
+ /* physics modes */
+ short phystype, rotmode, avemode, reactevent;
+ short draw, draw_as, draw_size, childtype;
+ /* number of path segments, power of 2 except */
+ short draw_step, ren_step;
+ short hair_step, keys_step;
+
+ /* adaptive path rendering */
+ short adapt_angle, adapt_pix;
+
+ short disp, omat, interpolation, rotfrom, integrator;
+ short kink, kink_axis, nbetween, boidneighbours;
+
+ /* billboards */
+ short bb_align, bb_uv_split, bb_anim, bb_split_offset;
+ float bb_tilt, bb_rand_tilt, bb_offset[2];
+
+ /* general values */
+ float sta, end, lifetime, randlife;
+ float timetweak, jitfac, keyed_time;
+ int totpart, userjit, grid_res;
+
+ /* initial velocity factors */
+ float normfac, obfac, randfac, partfac, tanfac, tanphase, reactfac;
+ float rotfac, avefac, phasefac;
+ /* physical properties */
+ float mass, size, randsize, reactshape;
+ /* global physical properties */
+ float acc[3], dragfac, brownfac, dampfac;
+ /* length */
+ float length, abslength, randlength;
+ /* children */
+ int child_nbr;
+ float parents, childsize, childrandsize;
+ float childrad, childflat, childspread;
+ /* clumping */
+ float clumpfac, clumppow;
+ /* kink */
+ float kink_amp, kink_freq, kink_shape;
+ /* rough */
+ float rough1, rough1_size;
+ float rough2, rough2_size, rough2_thres;
+ float rough_end, rough_end_shape;
+ /* branching */
+ float branch_thres;
+ /* drawing stuff */
+ float draw_line[2];
+
+ /* boids */
+ float max_vel, max_lat_acc, max_tan_acc;
+ float average_vel, banking, max_bank, groundz;
+ float boidfac[8];
+ char boidrule[8];
+
+ struct Group *dup_group;
+ struct Group *eff_group;
+ struct Object *dup_ob;
+ struct Object *bb_ob;
+ struct Ipo *ipo;
+ struct PartDeflect *pd;
+} ParticleSettings;
+
+typedef struct ParticleSystem{
+ struct ParticleSystem *next, *prev;
+
+ ParticleSettings *part;
+
+ ParticleData *particles;
+
+ ChildParticle *child;
+
+ struct ParticleEdit *edit;
+
+ struct ParticleCacheKey **pathcache;
+ struct ParticleCacheKey **childcache;
+
+ struct SoftBody *soft;
+
+ struct Object *target_ob;
+ struct Object *keyed_ob;
+ struct Object *lattice;
+
+ struct ListBase effectors, reactevents;
+
+ float imat[4][4]; /* used for duplicators */
+ float cfra;
+ int seed;
+ int flag, totpart, totchild, totcached, totchildcache, rt;
+ short recalc, target_psys, keyed_psys, totkeyed, softflag, bakespace;
+
+ char bb_uvname[3][32];
+
+ /* if you change these remember to update array lengths to PSYS_TOT_VG! */
+ short vgroup[11], vg_neg, rt3[2];
+}ParticleSystem;
+
+/* general particle maximums */
+/* no special why's, just seem reasonable */
+/* changing these (atleast upwards) should not cause any major problems */
+#define MAX_PARTS 100000 /* real particles/system */
+#define MAX_PART_CHILDREN 1000 /* child particles/real particles */
+#define MAX_BOIDNEIGHBOURS 10 /* neigbours considered/boid */
+
+/* part->type */
+/* hair is allways baked static in object/geometry space */
+/* other types (normal particles) are in global space and not static baked */
+#define PART_EMITTER 0
+#define PART_REACTOR 1
+#define PART_HAIR 2
+
+/* part->flag */
+#define PART_REACT_STA_END 1
+#define PART_REACT_MULTIPLE 2
+
+#define PART_LOOP 4
+#define PART_LOOP_INSTANT 8
+
+#define PART_HAIR_GEOMETRY 16
+
+#define PART_UNBORN 32 /*show unborn particles*/
+#define PART_DIED 64 /*show died particles*/
+
+#define PART_TRAND 128
+#define PART_EDISTR 256 /* particle/face from face areas */
+
+#define PART_STICKY 512 /*collided particles can stick to collider*/
+#define PART_DIE_ON_COL (1<<12)
+#define PART_SIZE_DEFL (1<<13) /* swept sphere deflections */
+#define PART_ROT_DYN (1<<14) /* dynamic rotation */
+#define PART_SIZEMASS (1<<16)
+
+#define PART_ABS_LENGTH (1<<15)
+
+#define PART_ABS_TIME (1<<17)
+#define PART_GLOB_TIME (1<<18)
+
+#define PART_BOIDS_2D (1<<19)
+
+#define PART_BRANCHING (1<<20)
+#define PART_ANIM_BRANCHING (1<<21)
+#define PART_SYMM_BRANCHING (1<<24)
+
+#define PART_HAIR_BSPLINE 1024
+
+#define PART_GRID_INVERT (1<<26)
+
+#define PART_CHILD_SEAMS (1<<28)
+#define PART_CHILD_RENDER (1<<29)
+#define PART_CHILD_GUIDE (1<<30)
+
+/* part->rotfrom */
+#define PART_ROT_KEYS 0 /* interpolate directly from keys */
+#define PART_ROT_ZINCR 1 /* same as zdir but done incrementally from previous position */
+#define PART_ROT_IINCR 2 /* same as idir but done incrementally from previous position */
+
+/* part->from */
+#define PART_FROM_VERT 0
+#define PART_FROM_FACE 1
+#define PART_FROM_VOLUME 2
+#define PART_FROM_PARTICLE 3
+#define PART_FROM_CHILD 4
+
+/* part->distr */
+#define PART_DISTR_JIT 0
+#define PART_DISTR_RAND 1
+#define PART_DISTR_GRID 2
+
+/* part->phystype */
+#define PART_PHYS_NO 0
+#define PART_PHYS_NEWTON 1
+#define PART_PHYS_KEYED 2
+#define PART_PHYS_BOIDS 3
+
+/* part->kink */
+#define PART_KINK_NO 0
+#define PART_KINK_CURL 1
+#define PART_KINK_RADIAL 2
+#define PART_KINK_WAVE 3
+#define PART_KINK_BRAID 4
+#define PART_KINK_ROT 5
+#define PART_KINK_ROLL 6
+
+/* part->draw */
+#define PART_DRAW_VEL 1
+#define PART_DRAW_ANG 2
+#define PART_DRAW_SIZE 4
+#define PART_DRAW_EMITTER 8 /* render emitter also */
+#define PART_DRAW_KEYS 16
+#define PART_DRAW_ADAPT 32
+#define PART_DRAW_COS 64
+#define PART_DRAW_BB_LOCK 128
+#define PART_DRAW_PARENT 256
+#define PART_DRAW_NUM 512
+#define PART_DRAW_RAND_GR 1024
+#define PART_DRAW_REN_ADAPT 2048
+#define PART_DRAW_VEL_LENGTH (1<<12)
+#define PART_DRAW_MAT_COL (1<<13)
+#define PART_DRAW_WHOLE_GR (1<<14)
+
+/* part->bb_align */
+#define PART_BB_X 0
+#define PART_BB_Y 1
+#define PART_BB_Z 2
+#define PART_BB_VIEW 3
+#define PART_BB_VEL 4
+
+/* part->bb_anim */
+#define PART_BB_ANIM_NONE 0
+#define PART_BB_ANIM_TIME 1
+#define PART_BB_ANIM_ANGLE 2
+#define PART_BB_ANIM_OFF_TIME 3
+#define PART_BB_ANIM_OFF_ANGLE 4
+
+/* part->bb_split_offset */
+#define PART_BB_OFF_NONE 0
+#define PART_BB_OFF_LINEAR 1
+#define PART_BB_OFF_RANDOM 2
+
+/* part->draw as */
+#define PART_DRAW_NOT 0
+#define PART_DRAW_DOT 1
+#define PART_DRAW_CIRC 2
+#define PART_DRAW_CROSS 3
+#define PART_DRAW_AXIS 4
+#define PART_DRAW_LINE 5
+#define PART_DRAW_PATH 6
+#define PART_DRAW_OB 7
+#define PART_DRAW_GR 8
+#define PART_DRAW_BB 9
+
+/* part->integrator */
+#define PART_INT_EULER 0
+#define PART_INT_MIDPOINT 1
+#define PART_INT_RK4 2
+
+/* part->rotmode */
+#define PART_ROT_NOR 1
+#define PART_ROT_VEL 2
+#define PART_ROT_RAND 3
+
+/* part->avemode */
+#define PART_AVE_SPIN 1
+#define PART_AVE_RAND 2
+#define PART_AVE_VEL 3
+
+/* part->reactevent */
+#define PART_EVENT_DEATH 0
+#define PART_EVENT_COLLIDE 1
+#define PART_EVENT_NEAR 2
+
+/* part->childtype */
+#define PART_CHILD_PARTICLES 1
+#define PART_CHILD_FACES 2
+
+/* psys->recalc */
+#define PSYS_INIT 1
+#define PSYS_DISTR 2
+#define PSYS_ALLOC 4
+#define PSYS_TYPE 8
+#define PSYS_RECALC_HAIR 16
+
+/* psys->flag */
+#define PSYS_CURRENT 1
+//#define PSYS_BAKING 2
+//#define PSYS_BAKE_UI 4
+#define PSYS_KEYED_TIME 8
+#define PSYS_ENABLED 16
+#define PSYS_FIRST_KEYED 32
+#define PSYS_DRAWING 64
+//#define PSYS_SOFT_BAKE 128
+#define PSYS_DELETE 256 /* remove particlesystem as soon as possible */
+#define PSYS_HAIR_DONE 512
+#define PSYS_KEYED 1024
+#define PSYS_EDITED 2048
+#define PSYS_PROTECT_CACHE 4096
+
+/* pars->flag */
+#define PARS_UNEXIST 1
+#define PARS_NO_DISP 2
+#define PARS_STICKY 4
+#define PARS_TRANSFORM 8
+#define PARS_HIDE 16
+#define PARS_TAG 32
+#define PARS_REKEY 64
+#define PARS_EDIT_RECALC 128
+
+/* pars->alive */
+#define PARS_KILLED 0
+#define PARS_DEAD 1
+#define PARS_UNBORN 2
+#define PARS_ALIVE 3
+
+/* psys->vg */
+#define PSYS_TOT_VG 11
+
+#define PSYS_VG_DENSITY 0
+#define PSYS_VG_VEL 1
+#define PSYS_VG_LENGTH 2
+#define PSYS_VG_CLUMP 3
+#define PSYS_VG_KINK 4
+#define PSYS_VG_ROUGH1 5
+#define PSYS_VG_ROUGH2 6
+#define PSYS_VG_ROUGHE 7
+#define PSYS_VG_SIZE 8
+#define PSYS_VG_TAN 9
+#define PSYS_VG_ROT 10
+
+/* part->boidrules */
+#define BOID_TOT_RULES 8
+
+#define BOID_COLLIDE 0
+#define BOID_AVOID 1
+#define BOID_CROWD 2
+#define BOID_CENTER 3
+#define BOID_AV_VEL 4
+#define BOID_VEL_MATCH 5
+#define BOID_GOAL 6
+#define BOID_LEVEL 7
+
+
+//#define PSYS_INTER_CUBIC 0
+//#define PSYS_INTER_LINEAR 1
+//#define PSYS_INTER_CARDINAL 2
+//#define PSYS_INTER_BSPLINE 3
+
+#endif
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 1b8314996f0..1a1cb1c0f2b 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -308,11 +308,28 @@ typedef struct TimeMarker {
unsigned int flag;
} TimeMarker;
-struct ImagePaintSettings {
+typedef struct ImagePaintSettings {
struct Brush *brush;
short flag, tool;
int pad3;
-};
+} ImagePaintSettings;
+
+typedef struct ParticleBrushData {
+ short size, strength; /* commong settings */
+ short step, invert; /* for specific brushes only */
+} ParticleBrushData;
+
+typedef struct ParticleEditSettings {
+ short flag;
+ short totrekey;
+ short totaddkey;
+ short brushtype;
+
+ ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
+
+ float emitterdist;
+ int draw_timed;
+} ParticleEditSettings;
typedef struct ToolSettings {
/* Subdivide Settings */
@@ -348,6 +365,9 @@ typedef struct ToolSettings {
/* Image Paint (8 byte aligned please!) */
struct ImagePaintSettings imapaint;
+
+ /* Particle Editing */
+ struct ParticleEditSettings particle;
/* Select Group Threshold */
float select_thresh;
@@ -606,6 +626,11 @@ typedef struct Scene {
#define SCE_SELECT_EDGE 2
#define SCE_SELECT_FACE 4
+/* sce->selectmode for particles */
+#define SCE_SELECT_PATH 1
+#define SCE_SELECT_POINT 2
+#define SCE_SELECT_END 4
+
/* sce->recalc (now in use by previewrender) */
#define SCE_PRV_CHANGED 1
@@ -658,6 +683,28 @@ typedef struct Scene {
#define IMAGEPAINT_DRAW_TOOL 2
#define IMAGEPAINT_DRAW_TOOL_DRAWING 4
+/* toolsettings->particle flag */
+#define PE_KEEP_LENGTHS 1
+#define PE_LOCK_FIRST 2
+#define PE_DEFLECT_EMITTER 4
+#define PE_INTERPOLATE_ADDED 8
+#define PE_SHOW_CHILD 16
+#define PE_SHOW_TIME 32
+#define PE_X_MIRROR 64
+
+/* toolsetting->particle brushtype */
+#define PE_BRUSH_NONE -1
+#define PE_BRUSH_COMB 0
+#define PE_BRUSH_CUT 1
+#define PE_BRUSH_LENGTH 2
+#define PE_BRUSH_PUFF 3
+#define PE_BRUSH_ADD 4
+#define PE_BRUSH_WEIGHT 5
+#define PE_BRUSH_SMOOTH 6
+
+/* this must equal ParticleEditSettings.brush array size */
+#define PE_TOT_BRUSH 7
+
/* toolsettings->retopo_mode */
#define RETOPO 1
#define RETOPO_PAINT 2
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index cf51990c9bf..2de6aba6b6f 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -57,9 +57,9 @@ typedef struct MTex {
char projx, projy, projz, mapping;
float ofs[3], size[3];
- short texflag, colormodel;
+ short texflag, colormodel, pmapto, pmaptoneg;
float r, g, b, k;
- float def_var;
+ float def_var, rt;
float colfac, norfac, varfac;
float dispfac;
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index af41380d5f8..f696c45b315 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -127,6 +127,7 @@ char *includefiles[] = {
"DNA_color_types.h",
"DNA_brush_types.h",
"DNA_customdata_types.h",
+ "DNA_particle_types.h",
// if you add files here, please add them at the end
// of makesdna.c (this file) as well
@@ -1146,4 +1147,5 @@ int main(int argc, char ** argv)
#include "DNA_color_types.h"
#include "DNA_brush_types.h"
#include "DNA_customdata_types.h"
+#include "DNA_particle_types.h"
/* end of list */