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

◆ save_mesh() [3/4]

MAYAFLUX_API bool MayaFlux::save_mesh ( const std::shared_ptr< Nodes::Network::MeshNetwork > &  network,
const std::string &  suggested_name,
const IO::ModelWriteOptions &  options 
)

Present a native save-file dialog filtered to 3D model formats and save network to the chosen path via IOManager::save_mesh().

Parameters
networkSource MeshNetwork to encode.
suggested_nameFilename pre-filled in the dialog name field.
optionsFormat-specific writer options forwarded to IOManager.

Definition at line 479 of file Depot.cpp.

483{
484 if (!require_portal("save_mesh"))
485 return false;
486
487 auto iom = get_io_manager();
488 if (!iom) {
489 MF_ERROR(Journal::Component::API, Journal::Context::Runtime,
490 "save_mesh: IOManager unavailable");
491 return false;
492 }
493
494 return Portal::System::Dialog::save_file<bool>(
495 [&iom, &network, &options](const fs::path& p) {
496 return iom->save_mesh(network, p.string(), options);
497 },
498 [](Core::SystemDialogError) { },
499 suggested_name,
500 k_mesh_save_filters);
501}
#define MF_ERROR(comp, ctx,...)
Core::GlobalNetworkConfig network
Definition Config.cpp:43
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, network, and MayaFlux::Journal::Runtime.

+ Here is the call graph for this function: