Blender
V5.0
source
blender
depsgraph
intern
eval
deg_eval_runtime_backup.h
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
9
#pragma once
10
11
#include "
DNA_ID.h
"
12
13
#include "
intern/eval/deg_eval_runtime_backup_animation.h
"
14
#include "
intern/eval/deg_eval_runtime_backup_movieclip.h
"
15
#include "
intern/eval/deg_eval_runtime_backup_object.h
"
16
#include "
intern/eval/deg_eval_runtime_backup_scene.h
"
17
#include "
intern/eval/deg_eval_runtime_backup_sound.h
"
18
#include "
intern/eval/deg_eval_runtime_backup_volume.h
"
19
20
namespace
blender::deg
{
21
22
struct
Depsgraph
;
23
24
class
RuntimeBackup
{
25
public
:
26
explicit
RuntimeBackup
(
const
Depsgraph
*
depsgraph
);
27
28
/* NOTE: Will reset all runtime fields which has been backed up to nullptr. */
29
void
init_from_id
(
ID
*
id
);
30
31
/* Restore fields to the given ID. */
32
void
restore_to_id
(
ID
*
id
);
33
34
/* Denotes whether init_from_id did put anything into the backup storage.
35
* This will not be the case when init_from_id() is called for an ID which has never been
36
* copied-on-eval. In this case there is no need to backup or restore anything.
37
*
38
* It also allows to have restore() logic to be symmetrical to init() without need to worry
39
* that init() might not have happened.
40
*
41
* In practice this is used by audio system to lock audio while scene is going through
42
* copy-on-evaluation mechanism. */
43
bool
have_backup
;
44
45
/* Struct members of the ID pointer. */
46
struct
{
47
void
*
py_instance
;
48
}
id_data
;
49
50
AnimationBackup
animation_backup
;
51
SceneBackup
scene_backup
;
52
SoundBackup
sound_backup
;
53
ObjectRuntimeBackup
object_backup
;
54
MovieClipBackup
movieclip_backup
;
55
VolumeBackup
volume_backup
;
56
};
57
58
}
// namespace blender::deg
DNA_ID.h
ID and Library types, which are fundamental for SDNA.
depsgraph
BPy_StructRNA * depsgraph
Definition
bpy_driver.cc:173
blender::deg::AnimationBackup
Definition
deg_eval_runtime_backup_animation.h:38
blender::deg::MovieClipBackup
Definition
deg_eval_runtime_backup_movieclip.h:20
blender::deg::ObjectRuntimeBackup
Definition
deg_eval_runtime_backup_object.h:28
blender::deg::RuntimeBackup::sound_backup
SoundBackup sound_backup
Definition
deg_eval_runtime_backup.h:52
blender::deg::RuntimeBackup::have_backup
bool have_backup
Definition
deg_eval_runtime_backup.h:43
blender::deg::RuntimeBackup::init_from_id
void init_from_id(ID *id)
Definition
deg_eval_runtime_backup.cc:29
blender::deg::RuntimeBackup::object_backup
ObjectRuntimeBackup object_backup
Definition
deg_eval_runtime_backup.h:53
blender::deg::RuntimeBackup::id_data
struct blender::deg::RuntimeBackup::@174342006056032174270360334042251111060023007145 id_data
blender::deg::RuntimeBackup::animation_backup
AnimationBackup animation_backup
Definition
deg_eval_runtime_backup.h:50
blender::deg::RuntimeBackup::restore_to_id
void restore_to_id(ID *id)
Definition
deg_eval_runtime_backup.cc:64
blender::deg::RuntimeBackup::RuntimeBackup
RuntimeBackup(const Depsgraph *depsgraph)
Definition
deg_eval_runtime_backup.cc:17
blender::deg::RuntimeBackup::movieclip_backup
MovieClipBackup movieclip_backup
Definition
deg_eval_runtime_backup.h:54
blender::deg::RuntimeBackup::scene_backup
SceneBackup scene_backup
Definition
deg_eval_runtime_backup.h:51
blender::deg::RuntimeBackup::py_instance
void * py_instance
Definition
deg_eval_runtime_backup.h:47
blender::deg::RuntimeBackup::volume_backup
VolumeBackup volume_backup
Definition
deg_eval_runtime_backup.h:55
blender::deg::SceneBackup
Definition
deg_eval_runtime_backup_scene.h:20
blender::deg::SoundBackup
Definition
deg_eval_runtime_backup_sound.h:18
blender::deg::VolumeBackup
Definition
deg_eval_runtime_backup_volume.h:19
deg_eval_runtime_backup_animation.h
deg_eval_runtime_backup_movieclip.h
deg_eval_runtime_backup_object.h
deg_eval_runtime_backup_scene.h
deg_eval_runtime_backup_sound.h
deg_eval_runtime_backup_volume.h
blender::deg
Definition
DEG_depsgraph_light_linking.hh:14
ID
Definition
DNA_ID.h:414
blender::deg::Depsgraph
Definition
depsgraph.hh:48
Generated on
for Blender by
doxygen
1.16.1