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:
authorDalai Felinto <dfelinto@gmail.com>2018-06-06 17:01:51 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-06-06 17:44:51 +0300
commit4e213d42162b8d38435911352e52dbb609e36769 (patch)
treeb70fd088d8ba5452aaf9fc4a88876a0cdfbdc2b1 /source/blender/depsgraph/intern/depsgraph_query_iter.cc
parent9a0506ea185c0ca6505e85ea0f5f5dc5fc48aa62 (diff)
Depsgraph iterator: Remove explicit mode
We can get the mode from the depsgraph itself.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_query_iter.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query_iter.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_query_iter.cc b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
index f9bc0da7d28..97a28038b7b 100644
--- a/source/blender/depsgraph/intern/depsgraph_query_iter.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
@@ -211,7 +211,9 @@ void DEG_iterator_objects_begin(BLI_Iterator *iter, DEGObjectIterData *data)
data->scene = DEG_get_evaluated_scene(depsgraph);
data->id_node_index = 0;
data->num_id_nodes = num_id_nodes;
- data->visibility_check = (data->mode == DEG_ITER_OBJECT_MODE_RENDER)
+ eEvaluationMode eval_mode = DEG_get_mode(depsgraph);
+ /* Viewport rendered mode is DAG_EVAL_PREVIEW but still treated as viewport. */
+ data->visibility_check = (eval_mode == DAG_EVAL_RENDER)
? OB_VISIBILITY_CHECK_FOR_RENDER
: OB_VISIBILITY_CHECK_FOR_VIEWPORT;