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
path: root/tests
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 /tests
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 'tests')
-rw-r--r--tests/gtests/alembic/abc_export_test.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/gtests/alembic/abc_export_test.cc b/tests/gtests/alembic/abc_export_test.cc
index 3277e84fe42..cbf4ed43fe8 100644
--- a/tests/gtests/alembic/abc_export_test.cc
+++ b/tests/gtests/alembic/abc_export_test.cc
@@ -15,10 +15,10 @@ extern "C" {
class TestableAbcExporter : public AbcExporter {
public:
- TestableAbcExporter(Main *bmain, EvaluationContext *eval_ctx,
+ TestableAbcExporter(Main *bmain,
Scene *scene, ViewLayer *view_layer, Depsgraph *depsgraph,
const char *filename, ExportSettings &settings)
- : AbcExporter(bmain, eval_ctx, scene, depsgraph, filename, settings)
+ : AbcExporter(bmain, scene, view_layer, depsgraph, filename, settings)
{
}
@@ -40,7 +40,6 @@ class AlembicExportTest : public testing::Test
protected:
ExportSettings settings;
Scene scene;
- EvaluationContext eval_ctx;
Depsgraph *depsgraph;
TestableAbcExporter *exporter;
Main *bmain;
@@ -58,7 +57,6 @@ protected:
/* TODO(sergey): Pass scene layer somehow? */
ViewLayer *view_layer = (ViewLayer *)scene.view_layers.first;
- DEG_evaluation_context_init(&eval_ctx, DAG_EVAL_VIEWPORT);
depsgraph = DEG_graph_new(&scene, view_layer, DAG_EVAL_VIEWPORT);
exporter = NULL;
@@ -75,7 +73,7 @@ protected:
void createExporter()
{
ViewLayer *view_layer = (ViewLayer *)scene.view_layers.first;
- exporter = new TestableAbcExporter(bmain, &eval_ctx, &scene, view_layer, depsgraph, "somefile.abc", settings);
+ exporter = new TestableAbcExporter(bmain, &scene, view_layer, depsgraph, "somefile.abc", settings);
}
};