Skip to content

Commit

Permalink
OgawaWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
satcy committed Jan 29, 2018
1 parent 9bb6a22 commit 3da7fd3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/ofxAlembicWriter.cpp 100644 → 100755
Expand Up @@ -3,11 +3,14 @@
using namespace ofxAlembic;
using namespace Alembic::AbcGeom;

bool Writer::open(const string& path, float fps)
bool Writer::open(const string& path, float fps, Alembic::AbcCoreFactory::IFactory::CoreType type)
{
ofxAlembic::init();

archive = OArchive(Alembic::AbcCoreHDF5::WriteArchive(), ofToDataPath(path));
if ( type == Alembic::AbcCoreFactory::IFactory::kOgawa) {
archive = OArchive(Alembic::AbcCoreOgawa::WriteArchive(), ofToDataPath(path));
} else if ( type == Alembic::AbcCoreFactory::IFactory::kHDF5 ) {
archive = OArchive(Alembic::AbcCoreHDF5::WriteArchive(), ofToDataPath(path));
}
if (!archive.valid()) return false;

archive.setCompressionHint(1);
Expand Down
4 changes: 3 additions & 1 deletion src/ofxAlembicWriter.h 100644 → 100755
Expand Up @@ -5,7 +5,9 @@
#include "ofxAlembicType.h"

#include <Alembic/AbcGeom/All.h>
#include <Alembic/AbcCoreFactory/All.h>
#include <Alembic/AbcCoreHDF5/All.h>
#include <Alembic/AbcCoreOgawa/All.h>

namespace ofxAlembic
{
Expand All @@ -18,7 +20,7 @@ class ofxAlembic::Writer

~Writer() { close(); }

bool open(const string& path, float fps = 30);
bool open(const string& path, float fps = 30, Alembic::AbcCoreFactory::IFactory::CoreType type = Alembic::AbcCoreFactory::IFactory::kHDF5);
void close();

void addPoints(const string& path, const Points& points);
Expand Down

0 comments on commit 3da7fd3

Please sign in to comment.