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

◆ save_volume() [2/2]

MAYAFLUX_API bool MayaFlux::save_volume ( const std::shared_ptr< Buffers::VolumeGridBuffer > & volume,
const std::string & suggested_name = "output.vdb" )

Present a native save-file dialog filtered to volume formats and save volume to the chosen path via IOManager::save_volume().

Blocks until the user confirms or cancels. The download and encode task are 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
volumeSource VolumeGridBuffer to download and encode.
suggested_nameFilename pre-filled in the dialog name field.

Definition at line 503 of file Depot.cpp.

506{
507 if (!require_portal("save_volume"))
508 return false;
509
510 auto iom = get_io_manager();
511 if (!iom) {
513 "save_volume: IOManager unavailable");
514 return false;
515 }
516
518 [&iom, &volume](const fs::path& p) {
519 return iom->save_volume(volume, p.string(), IO::VolumeWriteOptions {});
520 },
522 suggested_name,
523 k_volume_filters);
524}
#define MF_ERROR(comp, ctx,...)
SystemDialogError
Failure modes for OS dialog operations.
@ Runtime
General runtime operations (default fallback).
@ API
MayaFlux/API Wrapper and convenience functions.
void save_file(ChooserCallback callback, std::string suggested_name, std::vector< ChooserFilter > filters, std::filesystem::path start_dir)
Present a native save-file dialog, delivering the result via callback.
Definition Chooser.cpp:23
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, MayaFlux::Journal::Runtime, and MayaFlux::Portal::System::Dialog::save_file().

Here is the call graph for this function: