Blender
V3.3
source
blender
depsgraph
intern
eval
deg_eval_runtime_backup.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later
2
* Copyright 2019 Blender Foundation. All rights reserved. */
3
8
#pragma once
9
10
#include "
DNA_ID.h
"
11
12
#include "
intern/eval/deg_eval_runtime_backup_animation.h
"
13
#include "
intern/eval/deg_eval_runtime_backup_gpencil.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-write. 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-write 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
DrawDataList
drawdata_backup
;
55
DrawDataList
*
drawdata_ptr
;
56
MovieClipBackup
movieclip_backup
;
57
VolumeBackup
volume_backup
;
58
GPencilBackup
gpencil_backup
;
59
};
60
61
}
// namespace blender::deg
Depsgraph
struct Depsgraph Depsgraph
Definition:
DEG_depsgraph.h:35
DNA_ID.h
ID and Library types, which are fundamental for sdna.
blender::deg::AnimationBackup
Definition:
deg_eval_runtime_backup_animation.h:35
blender::deg::GPencilBackup
Definition:
deg_eval_runtime_backup_gpencil.h:17
blender::deg::MovieClipBackup
Definition:
deg_eval_runtime_backup_movieclip.h:19
blender::deg::ObjectRuntimeBackup
Definition:
deg_eval_runtime_backup_object.h:24
blender::deg::RuntimeBackup
Definition:
deg_eval_runtime_backup.h:24
blender::deg::RuntimeBackup::drawdata_backup
DrawDataList drawdata_backup
Definition:
deg_eval_runtime_backup.h:54
blender::deg::RuntimeBackup::drawdata_ptr
DrawDataList * drawdata_ptr
Definition:
deg_eval_runtime_backup.h:55
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::gpencil_backup
GPencilBackup gpencil_backup
Definition:
deg_eval_runtime_backup.h:58
blender::deg::RuntimeBackup::init_from_id
void init_from_id(ID *id)
Definition:
deg_eval_runtime_backup.cc:33
blender::deg::RuntimeBackup::object_backup
ObjectRuntimeBackup object_backup
Definition:
deg_eval_runtime_backup.h:53
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:78
blender::deg::RuntimeBackup::id_data
struct blender::deg::RuntimeBackup::@192 id_data
blender::deg::RuntimeBackup::RuntimeBackup
RuntimeBackup(const Depsgraph *depsgraph)
Definition:
deg_eval_runtime_backup.cc:18
blender::deg::RuntimeBackup::movieclip_backup
MovieClipBackup movieclip_backup
Definition:
deg_eval_runtime_backup.h:56
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:57
blender::deg::SceneBackup
Definition:
deg_eval_runtime_backup_scene.h:19
blender::deg::SoundBackup
Definition:
deg_eval_runtime_backup_sound.h:17
blender::deg::VolumeBackup
Definition:
deg_eval_runtime_backup_volume.h:18
depsgraph
const Depsgraph * depsgraph
Definition:
deg_eval_copy_on_write.cc:499
deg_eval_runtime_backup_animation.h
deg_eval_runtime_backup_gpencil.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_builder.cc:40
DrawDataList
Definition:
DNA_ID.h:43
ID
Definition:
DNA_ID.h:368
blender::deg::Depsgraph
Definition:
depsgraph.h:43
Generated on Tue Oct 22 2024 13:18:25 for Blender by
doxygen
1.9.1