Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/volume.cc
| Show First 20 Lines • Show All 517 Lines • ▼ Show 20 Lines | static void volume_copy_data(Main *UNUSED(bmain), | ||||
| volume_dst->mat = (Material **)MEM_dupallocN(volume_src->mat); | volume_dst->mat = (Material **)MEM_dupallocN(volume_src->mat); | ||||
| #ifdef WITH_OPENVDB | #ifdef WITH_OPENVDB | ||||
| if (volume_src->runtime.grids) { | if (volume_src->runtime.grids) { | ||||
| const VolumeGridVector &grids_src = *(volume_src->runtime.grids); | const VolumeGridVector &grids_src = *(volume_src->runtime.grids); | ||||
| volume_dst->runtime.grids = OBJECT_GUARDED_NEW(VolumeGridVector, grids_src); | volume_dst->runtime.grids = OBJECT_GUARDED_NEW(VolumeGridVector, grids_src); | ||||
| } | } | ||||
| #endif | #endif | ||||
| volume_dst->batch_cache = nullptr; | |||||
| } | } | ||||
| static void volume_free_data(ID *id) | static void volume_free_data(ID *id) | ||||
| { | { | ||||
| Volume *volume = (Volume *)id; | Volume *volume = (Volume *)id; | ||||
| BKE_animdata_free(&volume->id, false); | BKE_animdata_free(&volume->id, false); | ||||
| BKE_volume_batch_cache_free(volume); | BKE_volume_batch_cache_free(volume); | ||||
| MEM_SAFE_FREE(volume->mat); | MEM_SAFE_FREE(volume->mat); | ||||
| ▲ Show 20 Lines • Show All 1,014 Lines • Show Last 20 Lines | |||||