diff options
author | Janne Karhu <jhkarh@gmail.com> | 2009-06-21 14:16:52 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2009-06-21 14:16:52 +0400 |
commit | 6b15024f4a7b999331694d8a9135d47e4b783a34 (patch) | |
tree | 0b5a5c3b02778a7ca9df7628e742f98704505bb7 /source/blender/makesdna/DNA_object_force.h | |
parent | 64274de2fe8ef3b9a98a5cb3bd7d691fa1cee600 (diff) |
Pointcache refresh part 1:
* Particles support larger than 1 frame changes, bigger frame changes can result in inaccurate results, but it's super fast and you get a nice feeling of how the particles behave!
* "Cache to current frame" button calculates the exact result of particles at current frame.
* Current state of cache can be protected by making it a bake.
* Cache is now in memory by default, disk cache is an option.
* Only "viewport %" number of particles are calculated and cached in viewport, baking and rendering calculate all particles.
* Info on cached frames and memory usage given in ui.
* Support for exact "autocaching" of changes and large frame changes(disabled for now until exact place in event system is decided)
* "Continue physics" is probably deprecated after this and should be removed once sb & cloth use the new cache code.
Todo:
* Make softbody & cloth use the new cache things.
Other changes:
* Some cleanup of particle buttons.
Diffstat (limited to 'source/blender/makesdna/DNA_object_force.h')
-rw-r--r-- | source/blender/makesdna/DNA_object_force.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index 718d1a17834..a8d402fc503 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -33,6 +33,8 @@ #ifdef __cplusplus extern "C" { #endif + +#include "DNA_listBase.h" typedef struct PartDeflect { short deflect; /* Deflection flag - does mesh deflect particles*/ @@ -72,12 +74,25 @@ typedef struct PartDeflect { int seed; /* wind noise random seed */ } PartDeflect; +typedef struct PTCacheMem { + struct PTCacheMem *next, *prev; + int frame, totpoint; + float *data; /* data points */ + void *xdata; /* extra data */ +} PTCacheMem; + typedef struct PointCache { - int flag; /* generic flag */ + int flag, rt; /* generic flag */ 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 */ + char name[64]; + char prev_name[64]; + char info[64]; + struct ListBase mem_cache; } PointCache; typedef struct SBVertex { @@ -247,6 +262,8 @@ typedef struct SoftBody { #define PTCACHE_BAKING 8 #define PTCACHE_BAKE_EDIT 16 #define PTCACHE_BAKE_EDIT_ACTIVE 32 +#define PTCACHE_DISK_CACHE 64 +#define PTCACHE_AUTOCACHE 128 /* ob->softflag */ #define OB_SB_ENABLE 1 |