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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-06-04 17:52:48 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-06-05 15:23:54 +0300
commitbbaa1bffe9dbc35d2791b83d0014ccb4ffb6087a (patch)
treed0ded24e2fb254943831cacca7c28b7752e57eae /source/blender/depsgraph/DEG_depsgraph_query.h
parent863b7b3668fe67a082439181eaf49c3e94a87536 (diff)
Sound: Port to a copy-on-write concept
This change makes it so sound handles are created for evaluated scene, sequencer and speakers. This allows to have properly evaluated animation on them. For the viewport playback sound uses regular dependency graph. For the final render sound uses dependency graph created for render pipeline, which now also contains sequencer and sound datablocks. All the direct sound update calls are replaced with corresponding dependency graph recalc tag.
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph_query.h')
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_query.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h
index 48a62a69f30..cc6c5e7282a 100644
--- a/source/blender/depsgraph/DEG_depsgraph_query.h
+++ b/source/blender/depsgraph/DEG_depsgraph_query.h
@@ -85,6 +85,16 @@ void DEG_get_customdata_mask_for_object(const struct Depsgraph *graph,
* one. Assert will happen if it's not. */
struct Scene *DEG_get_evaluated_scene(const struct Depsgraph *graph);
+/* Similar to DEG_get_evaluated_scene(), but allows to access non-fully evaluated pointer without
+ * causing asserts or crashes. Works the following way:
+ * - If the scene was never evaluated NULL returned.
+ * - Otherwise the last known state of the scene is returned.
+ *
+ * Use in exceptional case if it's absolutely must to.
+ *
+ * Allows to pass depsgraph == NULL, wil lreturn NULL in that case. */
+struct Scene *DEG_get_evaluated_scene_if_exists(const struct Depsgraph *graph);
+
/* Get view layer at its evaluated state.
* This is a shortcut for accessing active view layer from evaluated scene. */
struct ViewLayer *DEG_get_evaluated_view_layer(const struct Depsgraph *graph);