diff options
author | Ray Molenkamp <github@lazydodo.com> | 2022-11-10 01:23:52 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2022-11-10 01:23:52 +0300 |
commit | 24bd098dbaf8d26511cb416badb8489d1fcfe00b (patch) | |
tree | 53e8f3f468da28fc80550db57d62afb16c6bb569 /source/blender/render/intern/texture_pointdensity.c | |
parent | 32aebe8c55963d42a6b541e266e85cac25f96311 (diff) | |
parent | d49dec896aaae5e2cdb5f2e2926f3bd010f4a0fe (diff) |
Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023
Diffstat (limited to 'source/blender/render/intern/texture_pointdensity.c')
-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) |