diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-11-09 22:30:41 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-11-09 22:37:55 +0300 |
commit | 7f6521f8dc95f175eb09c77c26f5a3eb3dc7a3c0 (patch) | |
tree | bcdd384f03c54c8ba8cd0441aca44f2097950d47 /source/blender/blenkernel/BKE_particle.h | |
parent | 8232cf5287445d21b7d6effb3f0e1ffb6df09adf (diff) |
Fix T100883: crash with particle instancing and clumping
Properly initialize clump curve mapping tables for duplis and other cases
where this was missed by making a generic init/free function instead of
duplicating the same logic in multiple places. Also fold lattice deform
init into this.
Diffstat (limited to 'source/blender/blenkernel/BKE_particle.h')
-rw-r--r-- | source/blender/blenkernel/BKE_particle.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index a797aef73f6..05b9aca7544 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -291,7 +291,11 @@ void psys_set_current_num(struct Object *ob, int index); /* UNUSED */ // struct Object *psys_find_object(struct Scene *scene, struct ParticleSystem *psys); -struct LatticeDeformData *psys_create_lattice_deform_data(struct ParticleSimulationData *sim); +/** + * Initialize/free data for particle simulation evaluation. + */ +void psys_sim_data_init(struct ParticleSimulationData *sim); +void psys_sim_data_free(struct ParticleSimulationData *sim); /** * For a given evaluated particle system get its original. @@ -416,7 +420,7 @@ void psys_get_particle_on_path(struct ParticleSimulationData *sim, struct ParticleKey *state, bool vel); /** - * Gets particle's state at a time. + * Gets particle's state at a time. Must call psys_sim_data_init before this. * \return true if particle exists and can be seen and false if not. */ bool psys_get_particle_state(struct ParticleSimulationData *sim, |