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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-02-26 18:46:48 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-02-28 00:25:54 +0300
commit828f54521301e42c1ff4ce791cb0caec3eb54d3f (patch)
tree7649e69c7c16263f754abbe52f3b5b78c6ea5b1a /source/blender/render/intern
parent06420c5fe8fda54c543f26f9d95d2c6fcf5161cd (diff)
Fix Cycles to mostly work with render layer / depsgraph changes.
Point density texture and motion blur are still broken, and many more changes are needed in general to used evaluated datablocks.
Diffstat (limited to 'source/blender/render/intern')
-rw-r--r--source/blender/render/intern/source/external_engine.c37
1 files changed, 26 insertions, 11 deletions
diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c
index 61ed19a1c9a..1b8ab4d8121 100644
--- a/source/blender/render/intern/source/external_engine.c
+++ b/source/blender/render/intern/source/external_engine.c
@@ -584,17 +584,32 @@ bool RE_bake_engine(
type->update(engine, re->main, re->scene);
if (type->bake) {
- type->bake(
- engine,
- re->scene,
- object,
- pass_type,
- pass_filter,
- object_id,
- pixel_array,
- num_pixels,
- depth,
- result);
+ EvaluationContext *eval_ctx = DEG_evaluation_context_new(DAG_EVAL_RENDER);
+ Depsgraph *depsgraph = DEG_graph_new();
+ ViewLayer *view_layer = BLI_findlink(&re->scene->view_layers, re->scene->active_view_layer);
+
+ DEG_evaluation_context_init_from_view_layer_for_render(
+ eval_ctx,
+ depsgraph,
+ re->scene,
+ view_layer);
+
+ BKE_scene_graph_update_tagged(eval_ctx, depsgraph, re->main, re->scene, view_layer);
+
+ type->bake(engine,
+ depsgraph,
+ re->scene,
+ object,
+ pass_type,
+ pass_filter,
+ object_id,
+ pixel_array,
+ num_pixels,
+ depth,
+ result);
+
+ DEG_graph_free(depsgraph);
+ DEG_evaluation_context_free(eval_ctx);
}
engine->tile_x = 0;