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:
authorJacques Lucke <jacques@blender.org>2020-06-08 16:41:41 +0300
committerJacques Lucke <jacques@blender.org>2020-06-08 16:49:17 +0300
commit6f96dfabe5cbf6966282decd2307ade9aacdeaee (patch)
tree01529fbad8453faf81a62877d03373eaf0b77b57 /source/blender/blenkernel/BKE_pointcache.h
parentbf4198cdaf7d4fa1a5f91526fb6bbe84d2fa2a37 (diff)
Simulations: initial simulation state and cache
The current particle state is stored in a `CustomData` instance and the cache is stored in `PointCache`. The current state exists on the copy-on-write copies of the simulation, while the cache only exists in the original data block. This patch implements a temporary trivial particle simulation that does not use the node system yet. It is used for testing and will be replaced soon. `PointCache` still has some limitations that need to be overcome using separate refactorings. For example, we need to be able to store the number of particles in the point cache. Also we need to change which attributes are stored for a particle system more dynamically than is currently possible afaik. Reviewers: brecht Differential Revision: https://developer.blender.org/D7836
Diffstat (limited to 'source/blender/blenkernel/BKE_pointcache.h')
-rw-r--r--source/blender/blenkernel/BKE_pointcache.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 164783f4d14..2dd364f3c48 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -64,6 +64,7 @@ extern "C" {
#define PTCACHE_TYPE_SMOKE_HIGHRES 4
#define PTCACHE_TYPE_DYNAMICPAINT 5
#define PTCACHE_TYPE_RIGIDBODY 6
+#define PTCACHE_TYPE_SIM_PARTICLES 7
/* high bits reserved for flags that need to be stored in file */
#define PTCACHE_TYPEFLAG_COMPRESS (1 << 16)
@@ -84,10 +85,12 @@ struct ListBase;
struct Main;
struct Object;
struct ParticleKey;
+struct ParticleSimulationState;
struct ParticleSystem;
struct PointCache;
struct RigidBodyWorld;
struct Scene;
+struct Simulation;
struct SoftBody;
struct ViewLayer;
@@ -292,6 +295,7 @@ void BKE_ptcache_id_from_dynamicpaint(PTCacheID *pid,
struct Object *ob,
struct DynamicPaintSurface *surface);
void BKE_ptcache_id_from_rigidbody(PTCacheID *pid, struct Object *ob, struct RigidBodyWorld *rbw);
+void BKE_ptcache_id_from_sim_particles(PTCacheID *pid, struct ParticleSimulationState *state);
PTCacheID BKE_ptcache_id_find(struct Object *ob, struct Scene *scene, struct PointCache *cache);
void BKE_ptcache_ids_from_object(struct ListBase *lb,