Blender  V2.93
deg_eval_runtime_backup_scene.cc
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2019 Blender Foundation.
17  * All rights reserved.
18  */
19 
25 
26 #include "BKE_sound.h"
27 
28 #include "DNA_rigidbody_types.h"
29 #include "DNA_scene_types.h"
30 
31 namespace blender::deg {
32 
34 {
35  reset();
36 }
37 
39 {
40  sound_scene = nullptr;
41  playback_handle = nullptr;
42  sound_scrub_handle = nullptr;
43  speaker_handles = nullptr;
45 }
46 
48 {
50 
55 
56  if (scene->rigidbody_world != nullptr) {
58  }
59 
60  /* Clear pointers stored in the scene, so they are not freed when copied-on-written datablock
61  * is freed for re-allocation. */
62  scene->sound_scene = nullptr;
63  scene->playback_handle = nullptr;
64  scene->sound_scrub_handle = nullptr;
65  scene->speaker_handles = nullptr;
66 
68 }
69 
71 {
76 
77  if (scene->rigidbody_world != nullptr) {
79  }
80 
82 
84 
85  reset();
86 }
87 
88 } // 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)
Scene scene
const Depsgraph * depsgraph
void * sound_scrub_handle
struct RigidBodyWorld * rigidbody_world
void * sound_scene
void * speaker_handles
void * playback_handle