Particles: Create a simulation state for every Particle Simulation node
Every Particle Simulation node has a name (or a path when it is in a node group). This name has to be used in the Simulation modifier on a point cloud to see the particles. Caching has been disabled for now, because it was holding back development a bit. To reset the simulation, go back to frame 1. Currently, there is no way to influence the simulation. There are just some randomly moving points. Changing that is the next step.
This commit is contained in:
@@ -8686,6 +8686,7 @@ static void direct_link_simulation(BlendDataReader *reader, Simulation *simulati
|
||||
|
||||
BLO_read_list(reader, &simulation->states);
|
||||
LISTBASE_FOREACH (SimulationState *, state, &simulation->states) {
|
||||
BLO_read_data_address(reader, &state->name);
|
||||
switch ((eSimulationStateType)state->type) {
|
||||
case SIM_STATE_TYPE_PARTICLES: {
|
||||
ParticleSimulationState *particle_state = (ParticleSimulationState *)state;
|
||||
|
||||
@@ -3832,6 +3832,7 @@ static void write_simulation(BlendWriter *writer, Simulation *simulation, const
|
||||
}
|
||||
|
||||
LISTBASE_FOREACH (SimulationState *, state, &simulation->states) {
|
||||
BLO_write_string(writer, state->name);
|
||||
switch ((eSimulationStateType)state->type) {
|
||||
case SIM_STATE_TYPE_PARTICLES: {
|
||||
ParticleSimulationState *particle_state = (ParticleSimulationState *)state;
|
||||
|
||||
Reference in New Issue
Block a user