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

◆ execute_mesh_write()

bool MayaFlux::IO::Detail::execute_mesh_write ( const std::string &  filepath,
const std::vector< Kakshya::MeshData > &  meshes,
const ModelWriteOptions &  options 
)

Definition at line 159 of file IOTransitions.cpp.

163{
164 auto writer = ModelWriterRegistry::instance().create_writer(filepath);
165 if (!writer) {
166 MF_ERROR(Journal::Component::API, Journal::Context::FileIO,
167 "save_mesh: no writer registered for '{}'", filepath);
168 return false;
169 }
170
171 const bool ok = writer->write(filepath, meshes, options);
172 if (!ok) {
173 MF_ERROR(Journal::Component::API, Journal::Context::FileIO,
174 "save_mesh: writer failed for '{}': {}", filepath, writer->get_last_error());
175 } else {
176 MF_INFO(Journal::Component::API, Journal::Context::FileIO,
177 "save_mesh: wrote '{}'", filepath);
178 }
179 return ok;
180}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)

References MayaFlux::Journal::API, MayaFlux::IO::WriterRegistry< Writer >::create_writer(), MayaFlux::Journal::FileIO, MayaFlux::IO::WriterRegistry< Writer >::instance(), MF_ERROR, and MF_INFO.

Referenced by MayaFlux::IO::IOManager::save_mesh().

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