diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-11-09 22:42:19 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-11-09 22:42:19 +0300 |
commit | 501036faae604f7e68a5700f41e019101ba57915 (patch) | |
tree | 828980c4e1b50f6ddefc5b62d5e1dd6a2faad113 /source/blender/render | |
parent | 5f169fdfdca38f7f5f54dce8a34aa01a881a6b89 (diff) | |
parent | 7f6521f8dc95f175eb09c77c26f5a3eb3dc7a3c0 (diff) |
Merge branch 'blender-v3.4-release'
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/texture_pointdensity.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/render/intern/texture_pointdensity.c b/source/blender/render/intern/texture_pointdensity.c index 5c31192f62a..09173aaa0e3 100644 --- a/source/blender/render/intern/texture_pointdensity.c +++ b/source/blender/render/intern/texture_pointdensity.c @@ -178,7 +178,7 @@ static void pointdensity_cache_psys( invert_m4_m4(ob->world_to_object, ob->object_to_world); total_particles = psys->totpart + psys->totchild; - psys->lattice_deform_data = psys_create_lattice_deform_data(&sim); + psys_sim_data_init(&sim); pd->point_tree = BLI_bvhtree_new(total_particles, 0.0, 4, 6); pd->totpoints = total_particles; @@ -258,10 +258,7 @@ static void pointdensity_cache_psys( BLI_bvhtree_balance(pd->point_tree); - if (psys->lattice_deform_data) { - BKE_lattice_deform_data_destroy(psys->lattice_deform_data); - psys->lattice_deform_data = NULL; - } + psys_sim_data_free(&sim); } static void pointdensity_cache_vertex_color(PointDensity *pd, @@ -780,7 +777,7 @@ static void particle_system_minmax(Depsgraph *depsgraph, invert_m4_m4(imat, object->object_to_world); total_particles = psys->totpart + psys->totchild; - psys->lattice_deform_data = psys_create_lattice_deform_data(&sim); + psys_sim_data_init(&sim); for (i = 0, pa = psys->particles; i < total_particles; i++, pa++) { float co_object[3], co_min[3], co_max[3]; @@ -796,10 +793,7 @@ static void particle_system_minmax(Depsgraph *depsgraph, minmax_v3v3_v3(min, max, co_max); } - if (psys->lattice_deform_data) { - BKE_lattice_deform_data_destroy(psys->lattice_deform_data); - psys->lattice_deform_data = NULL; - } + psys_sim_data_free(&sim); } void RE_point_density_cache(struct Depsgraph *depsgraph, PointDensity *pd) |