diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-03 14:02:39 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-03 14:02:39 +0300 |
commit | e72dfee66fe556dc09ae30e706a5d16d552a5413 (patch) | |
tree | 2c42fc11b387113a7cdc7abed82b96c4457ca6aa /tests/gtests/alembic | |
parent | 3a7a7ed03b7611a29de0e2a27e358035aee83dce (diff) |
Depsgraph: Use explicit depsgraph in alembic module
Diffstat (limited to 'tests/gtests/alembic')
-rw-r--r-- | tests/gtests/alembic/abc_export_test.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/gtests/alembic/abc_export_test.cc b/tests/gtests/alembic/abc_export_test.cc index 6fc976b8a55..b5ef1a194e9 100644 --- a/tests/gtests/alembic/abc_export_test.cc +++ b/tests/gtests/alembic/abc_export_test.cc @@ -15,11 +15,11 @@ extern "C" { class TestableAbcExporter : public AbcExporter { public: - TestableAbcExporter(Main *bmain, Scene *scene, const char *filename, ExportSettings &settings) - : AbcExporter(bmain, &eval_ctx, scene, filename, settings) + TestableAbcExporter(Main *bmain, EvaluationContext *eval_ctx, + Scene *scene, Depsgraph *depsgraph, + const char *filename, ExportSettings &settings) + : AbcExporter(bmain, eval_ctx, scene, depsgraph, filename, settings) { - /* TODO(sergey): Pass scene layer somehow? */ - DEG_evaluation_context_init(&eval_ctx, DAG_EVAL_VIEWPORT); } void getShutterSamples(unsigned int nr_of_samples, @@ -33,8 +33,6 @@ public: std::set<double> &frames) { AbcExporter::getFrameSet(nr_of_samples, frames); } - - EvaluationContext eval_ctx; }; class AlembicExportTest : public testing::Test @@ -42,8 +40,9 @@ class AlembicExportTest : public testing::Test protected: ExportSettings settings; Scene scene; - TestableAbcExporter *exporter; EvaluationContext eval_ctx; + Depsgraph *depsgraph; + TestableAbcExporter *exporter; Main *bmain; virtual void SetUp() @@ -57,19 +56,24 @@ protected: bmain = BKE_main_new(); + /* TODO(sergey): Pass scene layer somehow? */ + DEG_evaluation_context_init(&eval_ctx, DAG_EVAL_VIEWPORT); + depsgraph = DEG_graph_new(); + exporter = NULL; } virtual void TearDown() { BKE_main_free(bmain); + DEG_graph_free(depsgraph); delete exporter; } // Call after setting up the settings. void createExporter() { - exporter = new TestableAbcExporter(bmain, &scene, "somefile.abc", settings); + exporter = new TestableAbcExporter(bmain, &eval_ctx, &scene, depsgraph, "somefile.abc", settings); } }; |