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_simulation_types.h')
-rw-r--r--source/blender/makesdna/DNA_simulation_types.h36
1 files changed, 24 insertions, 12 deletions
diff --git a/source/blender/makesdna/DNA_simulation_types.h b/source/blender/makesdna/DNA_simulation_types.h
index 5bb0e50e089..afc59b422c5 100644
--- a/source/blender/makesdna/DNA_simulation_types.h
+++ b/source/blender/makesdna/DNA_simulation_types.h
@@ -30,16 +30,21 @@ typedef struct Simulation {
struct bNodeTree *nodetree;
- int flag;
+ uint32_t flag;
+
+ /** This is the frame in scene time, that the states correspond to. */
float current_frame;
+
+ /** Time since the start of the simulation in simulation time (which might differ from scene
+ * time). */
float current_simulation_time;
char _pad[4];
/** List containing SimulationState objects. */
struct ListBase states;
- /** List containing PersistentDataHandleItem objects. */
- struct ListBase persistent_data_handles;
+ /** List containing SimulationDependency objects. */
+ struct ListBase dependencies;
} Simulation;
typedef struct SimulationState {
@@ -54,8 +59,8 @@ typedef struct ParticleSimulationState {
SimulationState head;
/** Contains the state of the particles at time Simulation->current_frame. */
- int tot_particles;
- int next_particle_id;
+ int32_t tot_particles;
+ int32_t next_particle_id;
struct CustomData attributes;
} ParticleSimulationState;
@@ -66,20 +71,27 @@ typedef struct ParticleMeshEmitterSimulationState {
char _pad[4];
} ParticleMeshEmitterSimulationState;
-/** Stores a mapping between an integer handle and a corresponding ID data block. */
-typedef struct PersistentDataHandleItem {
- struct PersistentDataHandleItem *next;
- struct PersistentDataHandleItem *prev;
+/** Stores a reference to data that the simulation depends on. This is partially derived from the
+ * simulation node tree. */
+typedef struct SimulationDependency {
+ struct SimulationDependency *next;
+ struct SimulationDependency *prev;
struct ID *id;
- int handle;
- char _pad[4];
-} PersistentDataHandleItem;
+ int32_t handle;
+ uint32_t flag;
+} SimulationDependency;
/* Simulation.flag */
enum {
SIM_DS_EXPAND = (1 << 0),
};
+/* SimulationDependency.flag */
+enum {
+ SIM_DEPENDS_ON_TRANSFORM = (1 << 0),
+ SIM_DEPENDS_ON_GEOMETRY = (1 << 1),
+};
+
#define SIM_TYPE_NAME_PARTICLE_SIMULATION "Particle Simulation"
#define SIM_TYPE_NAME_PARTICLE_MESH_EMITTER "Particle Mesh Emitter"