Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r--source/blender/blenkernel/intern/sound.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 3b46677828d..18093173f7c 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -55,6 +55,9 @@
#include "BKE_sequencer.h"
#include "BKE_scene.h"
+#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_query.h"
+
#ifdef WITH_AUDASPACE
/* evil globals ;-) */
static int sound_cfra;
@@ -1183,3 +1186,15 @@ void BKE_sound_ensure_loaded(Main *bmain, bSound *sound)
}
BKE_sound_load(bmain, sound);
}
+
+void BKE_sound_evaluate(Depsgraph *depsgraph, Main *bmain, bSound *sound)
+{
+ DEG_debug_print_eval(depsgraph, __func__, sound->id.name, sound);
+ /* TODO(sergey): For now we keep sound handlers in an original IDs, but it
+ * should really be moved to an evaluated one. */
+ if (!DEG_is_active(depsgraph)) {
+ return;
+ }
+ bSound *sound_orig = (bSound *)DEG_get_original_id(&sound->id);
+ BKE_sound_ensure_loaded(bmain, sound_orig);
+}