Blender V5.0
deg_eval_runtime_backup_scene.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 "BKE_sound.h"
12
13#include "DNA_rigidbody_types.h"
14#include "DNA_scene_types.h"
15
16namespace blender::deg {
17
22
24{
25 sound_scene = nullptr;
26 playback_handle = nullptr;
27 sound_scrub_handle = nullptr;
28 speaker_handles = nullptr;
30}
31
33{
35
36 sound_scene = scene->sound_scene;
40
41 if (scene->rigidbody_world != nullptr) {
43 }
44
45 /* Clear pointers stored in the scene, so they are not freed when copied-on-written datablock
46 * is freed for re-allocation. */
47 scene->sound_scene = nullptr;
48 scene->playback_handle = nullptr;
49 scene->sound_scrub_handle = nullptr;
50 scene->speaker_handles = nullptr;
51
52 sequencer_backup.init_from_scene(scene);
53}
54
56{
57 scene->sound_scene = sound_scene;
61
62 if (scene->rigidbody_world != nullptr) {
64 }
65
66 sequencer_backup.restore_to_scene(scene);
67
69
70 reset();
71}
72
73} // namespace blender::deg
void BKE_sound_lock()
void BKE_sound_unlock()
Types and defines for representing Rigid Body entities.
BPy_StructRNA * depsgraph
SceneBackup(const Depsgraph *depsgraph)
void * sound_scrub_handle
struct RigidBodyWorld * rigidbody_world
void * sound_scene
void * speaker_handles
void * playback_handle