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:
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
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -125,7 +125,6 @@ static Volume *create_volume_from_mesh(const Mesh &mesh, GeoNodeExecParams ¶
|
|||
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,
|
||||
|
|
|
@ -221,7 +221,6 @@ static void initialize_volume_component_from_points(GeoNodeExecParams ¶ms,
|
|||
}
|
||||
|
||||
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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue