From 89eb05a8908130f8668e4c677d63f3d2b89e68bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=83=C2=83=C3=82=C2=BCvel?= Date: Sat, 28 Oct 2017 19:18:27 +0200 Subject: Alembic: exporting MetaBalls as mesh - Only basis balls are exported, as they represent the resulting mesh. As a result the mesh is written to Alembic using the name of the basis ball. - MetaBalls are converted to a mesh on every frame, then an AbcMeshWriter is used to write that mesh to Alembic. --- tests/gtests/alembic/CMakeLists.txt | 1 + tests/gtests/alembic/abc_export_test.cc | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/gtests') diff --git a/tests/gtests/alembic/CMakeLists.txt b/tests/gtests/alembic/CMakeLists.txt index fadf549e212..1511024ee51 100644 --- a/tests/gtests/alembic/CMakeLists.txt +++ b/tests/gtests/alembic/CMakeLists.txt @@ -25,6 +25,7 @@ set(INC . .. ../../../source/blender/blenlib + ../../../source/blender/blenkernel ../../../source/blender/alembic ../../../source/blender/makesdna ${ALEMBIC_INCLUDE_DIRS} diff --git a/tests/gtests/alembic/abc_export_test.cc b/tests/gtests/alembic/abc_export_test.cc index 9f10a1959ce..a2761513d06 100644 --- a/tests/gtests/alembic/abc_export_test.cc +++ b/tests/gtests/alembic/abc_export_test.cc @@ -5,6 +5,7 @@ #include "intern/abc_exporter.h" extern "C" { +#include "BKE_global.h" #include "BLI_utildefines.h" #include "BLI_math.h" #include "DNA_scene_types.h" @@ -12,8 +13,8 @@ extern "C" { class TestableAbcExporter : public AbcExporter { public: - TestableAbcExporter(Scene *scene, const char *filename, ExportSettings &settings) - : AbcExporter(scene, filename, settings) + TestableAbcExporter(Main *bmain, Scene *scene, const char *filename, ExportSettings &settings) + : AbcExporter(bmain, scene, filename, settings) {} void getShutterSamples(unsigned int nr_of_samples, @@ -57,7 +58,7 @@ protected: // Call after setting up the settings. void createExporter() { - exporter = new TestableAbcExporter(&scene, "somefile.abc", settings); + exporter = new TestableAbcExporter(G.main, &scene, "somefile.abc", settings); } }; -- cgit v1.2.3