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

◆ save_spatial()

MAYAFLUX_API bool MayaFlux::save_spatial ( std::vector< IO::SpatialCaptureSource >  sources,
const std::string &  suggested_name = "output.abc" 
)

Present a native save-file dialog filtered to Alembic and write every source once via IOManager::save_spatial_snapshot().

Blocks until the user confirms or cancels. The write itself is queued asynchronously; this function returns once the path is chosen and the task is enqueued. Returns false on cancellation, backend error, or if Portal::System is not initialized.

Parameters
sourcesStreams to write once. Build with IO::make_network_geometry_source() or a hand-written IO::SpatialCaptureSource.
suggested_nameFilename pre-filled in the dialog name field.

Definition at line 550 of file Depot.cpp.

553{
554 if (!require_portal("save_spatial"))
555 return false;
556
557 auto iom = get_io_manager();
558 if (!iom) {
559 MF_ERROR(Journal::Component::API, Journal::Context::Runtime,
560 "save_spatial: IOManager unavailable");
561 return false;
562 }
563
564 return Portal::System::Dialog::save_file<bool>(
565 [&iom, &sources](const fs::path& p) {
566 return iom->save_spatial_snapshot(std::move(sources), p.string());
567 },
568 [](Core::SystemDialogError) { },
569 suggested_name,
570 k_spatial_filters);
571}
#define MF_ERROR(comp, ctx,...)
std::shared_ptr< IO::IOManager > get_io_manager()
Retrieves the global IOManager instance for file loading and buffer management.
Definition Depot.cpp:575

References MayaFlux::Journal::API, get_io_manager(), MF_ERROR, and MayaFlux::Journal::Runtime.

+ Here is the call graph for this function: