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/DNA_object_force.h')
-rw-r--r--source/blender/makesdna/DNA_object_force.h75
1 files changed, 62 insertions, 13 deletions
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index a8d402fc503..468ad35de85 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -62,6 +62,8 @@ typedef struct PartDeflect {
float pdef_sbift; /* inner face thickness for softbody deflection */
float pdef_sboft; /* outer face thickness for softbody deflection */
+ float absorption, pad; /* used for forces */
+
/* variables for guide curve */
float clump_fac, clump_pow;
float kink_freq, kink_shape, kink_amp, free_end;
@@ -74,25 +76,56 @@ typedef struct PartDeflect {
int seed; /* wind noise random seed */
} PartDeflect;
+/* Point cache file data types:
+ * - used as (1<<flag) so poke jahka if you reach the limit of 15
+ * - to add new data types update:
+ * * BKE_ptcache_data_size()
+ * * ptcache_file_init_pointers()
+*/
+#define BPHYS_DATA_INDEX 0
+#define BPHYS_DATA_LOCATION 1
+#define BPHYS_DATA_VELOCITY 2
+#define BPHYS_DATA_ROTATION 3
+#define BPHYS_DATA_AVELOCITY 4 /* used for particles */
+#define BPHYS_DATA_XCONST 4 /* used for cloth */
+#define BPHYS_DATA_SIZE 5
+#define BPHYS_DATA_TIMES 6
+#define BPHYS_DATA_BOIDS 7
+
+#define BPHYS_TOT_DATA 8
+
typedef struct PTCacheMem {
struct PTCacheMem *next, *prev;
int frame, totpoint;
- float *data; /* data points */
- void *xdata; /* extra data */
+ unsigned int data_types, flag;
+ int *index_array; /* quick access to stored points with index */
+
+ void *data[8]; /* BPHYS_TOT_DATA */
+ void *cur[8]; /* BPHYS_TOT_DATA */
} PTCacheMem;
typedef struct PointCache {
- int flag, rt; /* generic flag */
+ struct PointCache *next, *prev;
+ int flag; /* generic flag */
+ int step; /* frames between cached frames */
int simframe; /* current frame of simulation (only if SIMULATION_VALID) */
int startframe; /* simulation start frame */
int endframe; /* simulation end frame */
int editframe; /* frame being edited (runtime only) */
int last_exact; /* last exact frame that's cached */
- int xdata_type; /* type of extra data */
+
+ /* for external cache files */
+ int totpoint; /* number of cached points */
+ int index, rt; /* modifier stack index */
+
char name[64];
char prev_name[64];
char info[64];
+ char path[240]; /* file path */
struct ListBase mem_cache;
+
+ struct PTCacheEdit *edit;
+ void (*free_edit)(struct PTCacheEdit *edit); /* free callback */
} PointCache;
typedef struct SBVertex {
@@ -153,18 +186,21 @@ typedef struct BulletSoftBody {
typedef struct SoftBody {
- struct ParticleSystem *particles; /* particlesystem softbody */
-
/* dynamic data */
int totpoint, totspring;
struct BodyPoint *bpoint; /* not saved in file */
struct BodySpring *bspring; /* not saved in file */
- float pad;
+ char pad;
+ char msg_lock;
+ short msg_value;
/* part of UI: */
/* general options */
float nodemass; /* softbody mass of *vertex* */
+ char namedVG_Mass[32]; /* along with it introduce mass painting
+ starting to fix old bug .. nastyness that VG are indexes
+ rather find them by name tag to find it -> jow20090613 */
float grav; /* softbody amount of gravitaion to apply */
float mediafrict; /* friction to env */
float rklimit; /* error limit for ODE solver */
@@ -177,13 +213,18 @@ typedef struct SoftBody {
float maxgoal;
float defgoal; /* default goal for vertices without vgroup */
short vertgroup; /* index starting at 1 */
+ char namedVG_Softgoal[32]; /* starting to fix old bug .. nastyness that VG are indexes
+ rather find them by name tag to find it -> jow20090613 */
short fuzzyness; /* */
/* springs */
float inspring; /* softbody inner springs */
float infrict; /* softbody inner springs friction */
-
+ char namedVG_Spring_K[32]; /* along with it introduce Spring_K painting
+ starting to fix old bug .. nastyness that VG are indexes
+ rather find them by name tag to find it -> jow20090613 */
+
/* baking */
int sfra, efra;
int interval;
@@ -213,6 +254,7 @@ typedef struct SoftBody {
float inpush;
struct PointCache *pointcache;
+ struct ListBase ptcaches;
} SoftBody;
@@ -226,6 +268,7 @@ typedef struct SoftBody {
#define PFIELD_HARMONIC 7
#define PFIELD_CHARGE 8
#define PFIELD_LENNARDJ 9
+#define PFIELD_BOID 10
/* pd->flag: various settings */
@@ -260,13 +303,19 @@ typedef struct SoftBody {
#define PTCACHE_OUTDATED 2
#define PTCACHE_SIMULATION_VALID 4
#define PTCACHE_BAKING 8
-#define PTCACHE_BAKE_EDIT 16
-#define PTCACHE_BAKE_EDIT_ACTIVE 32
+//#define PTCACHE_BAKE_EDIT 16
+//#define PTCACHE_BAKE_EDIT_ACTIVE 32
#define PTCACHE_DISK_CACHE 64
-#define PTCACHE_AUTOCACHE 128
+#define PTCACHE_QUICK_CACHE 128
+#define PTCACHE_FRAMES_SKIPPED 256
+#define PTCACHE_EXTERNAL 512
+#define PTCACHE_READ_INFO 1024
+
+/* PTCACHE_OUTDATED + PTCACHE_FRAMES_SKIPPED */
+#define PTCACHE_REDO_NEEDED 258
/* ob->softflag */
-#define OB_SB_ENABLE 1
+#define OB_SB_ENABLE 1 /* deprecated, use modifier */
#define OB_SB_GOAL 2
#define OB_SB_EDGES 4
#define OB_SB_QUADS 8
@@ -279,7 +328,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
+#define OB_SB_BIG_UI 8192
#define OB_SB_AERO_ANGLE 16384
/* sb->solverflags */