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-04-06 13:07:27 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-16 20:55:33 +0300
commit34ab90f546f097cada951b2c9ca22bf271996980 (patch)
treeebcdb3d37120ac1d8fb16462b9104badd1800329 /source/blender/depsgraph/intern/depsgraph_query_iter.cc
parent0c495005dd83913864acb510c1d4194a2275dbb0 (diff)
Depsgraph: remove EvaluationContext, pass Depsgraph instead.
The depsgraph was always created within a fixed evaluation context. Passing both risks the depsgraph and evaluation context not matching, and it complicates the Python API where we'd have to expose both which is not so easy to understand. This also removes the global evaluation context in main, which assumed there to be a single active scene and view layer. Differential Revision: https://developer.blender.org/D3152
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_query_iter.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query_iter.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_query_iter.cc b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
index 61f1ccdd2a0..c610e7fc500 100644
--- a/source/blender/depsgraph/intern/depsgraph_query_iter.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
@@ -187,7 +187,7 @@ static void DEG_iterator_objects_step(BLI_Iterator *iter, DEG::IDDepsNode *id_no
(object->transflag & OB_DUPLI))
{
data->dupli_parent = object;
- data->dupli_list = object_duplilist(&data->eval_ctx, data->scene, object);
+ data->dupli_list = object_duplilist(data->graph, data->scene, object);
data->dupli_object_next = (DupliObject *)data->dupli_list->first;
if (BKE_object_is_visible(object, (eObjectVisibilityCheck)data->visibility_check) == false) {
return;
@@ -209,13 +209,10 @@ void DEG_iterator_objects_begin(BLI_Iterator *iter, DEGObjectIterData *data)
return;
}
- /* TODO(sergey): What evaluation type we want here? */
- /* TODO(dfelinto): Get rid of evaluation context here, it's only used to do
- * direct dupli-objects update in group.c. Which is terribly bad, and all
- * objects are expected to be evaluated already. */
- DEG_evaluation_context_init(&data->eval_ctx, DAG_EVAL_VIEWPORT);
- data->eval_ctx.depsgraph = depsgraph;
- data->eval_ctx.view_layer = DEG_get_evaluated_view_layer(depsgraph);
+ /* TODO: Calling this forces the scene datablock to be expanded,
+ * otherwise we get crashes on load with copy-on-write. There may
+ * be a better solution for this. */
+ DEG_get_evaluated_view_layer(depsgraph);
iter->data = data;
data->dupli_parent = NULL;