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-03 15:47:44 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-06-04 10:41:33 +0300
commitc3f00d78796216ce15b6032f980539af6f1b0687 (patch)
tree32be9b0d474e1e37a9b5a83dd78a636bb415c12d /source/blender/depsgraph/intern/depsgraph_build.cc
parentb998a7b384c6a598ea851fbc06a2df8829c34329 (diff)
Fix T65447: Mask doesn't update in compositor unless there's motion blur on
This is probably just one of the related issues. Root of the problem was that compositor job was using original scene and node tree for compositing. It is not guaranteed to have all the evaluated data. Switched compositor job to use it's own render-pipeline-like dependency graph which has everything evaluated in it. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D4998
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_build.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build.cc36
1 files changed, 36 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index 138b23888b4..cf1ebccc6c6 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -315,6 +315,42 @@ void DEG_graph_build_for_render_pipeline(Depsgraph *graph,
}
}
+void DEG_graph_build_for_compositor_preview(Depsgraph *graph,
+ Main *bmain,
+ Scene *scene,
+ struct ViewLayer * /*view_layer*/,
+ bNodeTree *nodetree)
+{
+ double start_time = 0.0;
+ if (G.debug & (G_DEBUG_DEPSGRAPH_BUILD | G_DEBUG_DEPSGRAPH_TIME)) {
+ start_time = PIL_check_seconds_timer();
+ }
+ DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
+ /* Perform sanity checks. */
+ BLI_assert(deg_graph->scene == scene);
+ deg_graph->is_render_pipeline_depsgraph = true;
+ DEG::DepsgraphBuilderCache builder_cache;
+ /* Generate all the nodes in the graph first */
+ DEG::DepsgraphNodeBuilder node_builder(bmain, deg_graph, &builder_cache);
+ node_builder.begin_build();
+ node_builder.build_scene_render(scene);
+ node_builder.build_nodetree(nodetree);
+ node_builder.end_build();
+ /* Hook up relationships between operations - to determine evaluation
+ * order. */
+ DEG::DepsgraphRelationBuilder relation_builder(bmain, deg_graph, &builder_cache);
+ relation_builder.begin_build();
+ relation_builder.build_scene_render(scene);
+ relation_builder.build_nodetree(nodetree);
+ relation_builder.build_copy_on_write_relations();
+ /* Finalize building. */
+ graph_build_finalize_common(deg_graph, bmain);
+ /* Finish statistics. */
+ if (G.debug & (G_DEBUG_DEPSGRAPH_BUILD | G_DEBUG_DEPSGRAPH_TIME)) {
+ printf("Depsgraph built in %f seconds.\n", PIL_check_seconds_timer() - start_time);
+ }
+}
+
/* Tag graph relations for update. */
void DEG_graph_tag_relations_update(Depsgraph *graph)
{