Blender V4.3
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
10
11#include "BKE_sound.h"
12
13#include "DNA_rigidbody_types.h"
14#include "DNA_scene_types.h"
15
16namespace blender::deg {
17
19{
20 reset();
21}
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;
37 playback_handle = scene->playback_handle;
38 sound_scrub_handle = scene->sound_scrub_handle;
39 speaker_handles = scene->speaker_handles;
40
41 if (scene->rigidbody_world != nullptr) {
42 rigidbody_last_time = scene->rigidbody_world->ltime;
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
53}
54
56{
57 scene->sound_scene = sound_scene;
58 scene->playback_handle = playback_handle;
59 scene->sound_scrub_handle = sound_scrub_handle;
60 scene->speaker_handles = speaker_handles;
61
62 if (scene->rigidbody_world != nullptr) {
63 scene->rigidbody_world->ltime = rigidbody_last_time;
64 }
65
67
69
70 reset();
71}
72
73} // namespace blender::deg
void BKE_sound_lock(void)
void BKE_sound_unlock(void)
Types and defines for representing Rigid Body entities.
SceneBackup(const Depsgraph *depsgraph)
const Depsgraph * depsgraph