Cleanup: Remove redundant calls to init grids

`BKE_volume_init_grids` gets called in `volume_init_data` that is run
on creating new datablocks so it's unnecessary to run it separately.
This commit is contained in:
Erik Abrahamsson 2023-02-03 00:14:03 +01:00
parent 023277359f
commit 27e2b32a06
Notes: blender-bot 2023-05-22 14:36:19 +02:00
Referenced by issue #104363, Regression: Assert on rendering spot light gizmo for old file
Referenced by issue #107913, Hard Crash Opening Blender File With Library Overrides
4 changed files with 0 additions and 5 deletions

View File

@ -1506,7 +1506,6 @@ Volume *BKE_volume_new_for_eval(const Volume *volume_src)
volume_dst->totcol = volume_src->totcol;
volume_dst->render = volume_src->render;
volume_dst->display = volume_src->display;
BKE_volume_init_grids(volume_dst);
return volume_dst;
}

View File

@ -125,7 +125,6 @@ static Volume *create_volume_from_mesh(const Mesh &mesh, GeoNodeExecParams &para
mesh_to_volume_space_transform);
Volume *volume = reinterpret_cast<Volume *>(BKE_id_new_nomain(ID_VO, nullptr));
BKE_volume_init_grids(volume);
/* Convert mesh to grid and add to volume. */
geometry::volume_grid_add_from_mesh(volume,

View File

@ -221,7 +221,6 @@ static void initialize_volume_component_from_points(GeoNodeExecParams &params,
}
Volume *volume = reinterpret_cast<Volume *>(BKE_id_new_nomain(ID_VO, nullptr));
BKE_volume_init_grids(volume);
const float density = params.get_input<float>("Density");
convert_to_grid_index_space(voxel_size, positions, radii);

View File

@ -169,8 +169,6 @@ static void node_geo_exec(GeoNodeExecParams params)
openvdb::math::Vec3<float>(bounds_min.x, bounds_min.y, bounds_min.z));
Volume *volume = reinterpret_cast<Volume *>(BKE_id_new_nomain(ID_VO, nullptr));
BKE_volume_init_grids(volume);
BKE_volume_grid_add_vdb(*volume, "density", std::move(grid));
GeometrySet r_geometry_set;