[Bf-blender-cvs] [031f4ce8a65] blender2.8: Depsgraph: Use new scene update API in preview render
Sergey Sharybin
noreply at git.blender.org
Mon Nov 6 12:40:12 CET 2017
Commit: 031f4ce8a65d53105ffb193aef64a82daefa7587
Author: Sergey Sharybin
Date: Fri Nov 3 17:48:48 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB031f4ce8a65d53105ffb193aef64a82daefa7587
Depsgraph: Use new scene update API in preview render
===================================================================
M source/blender/editors/render/render_preview.c
===================================================================
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 958f1585e84..9bcc6f49b6f 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -604,10 +604,15 @@ static Scene *preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_ty
}
}
+ Depsgraph *depsgraph = BKE_scene_get_depsgraph(sce, scene_layer);
+ /* TODO(sergey): This is a temporary solution. */
+ if (depsgraph == NULL) {
+ sce->depsgraph_legacy = depsgraph = DEG_graph_new();
+ }
/* TODO(sergey): Use proper flag for tagging here. */
- DEG_id_tag_update(&sce->id, 0);
+ DEG_graph_id_tag_update(pr_main, depsgraph, &sce->id, 0);
DEG_relations_tag_update(pr_main);
- BKE_scene_update_tagged(pr_main->eval_ctx, pr_main, sce);
+ BKE_scene_graph_update_tagged(pr_main->eval_ctx, depsgraph, pr_main, sce);
return sce;
}
More information about the Bf-blender-cvs
mailing list