MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ open()

bool MayaFlux::IO::SpatialCache::open ( const std::string &  filepath)

Open an Alembic archive for writing, Ogawa backend.

Parameters
filepathDestination path. Anchored via resolve_write_path.
Returns
True on success. On failure call get_last_error().

Definition at line 224 of file SpatialCache.cpp.

225{
226 const auto resolved = resolve_write_path(filepath);
227
228 try {
229 m_impl->archive.emplace(Alembic::AbcCoreOgawa::WriteArchive(), resolved);
230 } catch (const std::exception& e) {
231 set_error(std::string("open: ") + e.what());
233 "SpatialCache::open: failed for '{}': {}", resolved, e.what());
234 return false;
235 }
236
238 "SpatialCache: opened '{}'", resolved);
239 return true;
240}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
std::unique_ptr< Impl > m_impl
void set_error(std::string msg) const
std::string resolve_write_path(const std::string &filepath)
Anchor a relative output path to Config::SOURCE_DIR.
@ FileIO
Filesystem I/O operations.
@ IO
Networking, file handling, streaming.

References MayaFlux::Journal::FileIO, MayaFlux::Journal::IO, MF_ERROR, MF_INFO, and MayaFlux::IO::resolve_write_path().

Referenced by MayaFlux::IO::save_spatial_snapshot().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: