Blender V5.0
deg_eval_runtime_backup_volume.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2019 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
10
11#include "BLI_assert.h"
12#include "BLI_string.h"
13
14#include "DNA_volume_types.h"
15
16#include "BKE_volume.hh"
17
18namespace blender::deg {
19
21
23{
24 STRNCPY(filepath, volume->filepath);
25 BLI_STATIC_ASSERT(sizeof(filepath) == sizeof(volume->filepath),
26 "VolumeBackup filepath length wrong");
27
28 grids = volume->runtime->grids;
29 volume->runtime->grids = nullptr;
30}
31
33{
34 if (grids) {
36 grids = nullptr;
37 }
38}
39
40} // namespace blender::deg
Volume data-block.
void BKE_volume_grids_backup_restore(Volume *volume, VolumeGridVector *grids, const char *filepath)
#define BLI_STATIC_ASSERT(a, msg)
Definition BLI_assert.h:83
char * STRNCPY(char(&dst)[N], const char *src)
Definition BLI_string.h:693
VolumeBackup(const Depsgraph *depsgraph)
char filepath[1024]
VolumeRuntimeHandle * runtime