MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / toAnySupportedSceneFormat

Function toAnySupportedSceneFormat

source/MRMesh/MRObjectSave.cpp:124–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122{
123
124Expected<void> toAnySupportedSceneFormat( const Object& object, const std::filesystem::path& file,
125 const Settings& settings )
126{
127 // NOTE: single-char string literal may break due to the GCC bug:
128 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
129 auto extension = '*' + toLower( utf8string( file.extension() ) );
130 auto saver = SceneSave::getSceneSaver( extension );
131 if ( !saver )
132 return unexpected( "unsupported file format" );
133
134 return saver( object, file, settings );
135}
136
137Expected<void> toAnySupportedFormat( const Object& object, const std::filesystem::path& file,
138 const Settings& settings )

Callers 4

actionMethod · 0.85
saveScene_Method · 0.85
saveChangesPopupFunction · 0.85
toAnySupportedFormatFunction · 0.85

Calls 3

toLowerFunction · 0.85
utf8stringFunction · 0.85
unexpectedFunction · 0.70

Tested by

no test coverage detected