MayaFlux 1.0.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 255 of file SpatialCache.cpp.

256{
257 const auto resolved = resolve_write_path(filepath);
258
259 try {
260 m_impl->archive.emplace(Alembic::AbcCoreOgawa::WriteArchive(), resolved);
261 } catch (const std::exception& e) {
262 set_error(std::string("open: ") + e.what());
264 "SpatialCache::open: failed for '{}': {}", resolved, e.what());
265 return false;
266 }
267
269 "SpatialCache: opened '{}'", resolved);
270 return true;
271}
#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, std::string_view default_directory=Config::OUT_DIR)
Resolve a writable path against the configured output directory.
@ FileIO
Filesystem I/O operations.
@ IO
Networking, file handling, streaming.

References MayaFlux::Journal::FileIO, MayaFlux::Journal::IO, m_impl, MF_ERROR, MF_INFO, open(), MayaFlux::IO::resolve_write_path(), set_error(), and SpatialCache().

Referenced by open(), operator=(), and MayaFlux::IO::save_spatial_snapshot().

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