MeshLib Documentation
Loading...
Searching...
No Matches
MRObjectSave.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRExpected.h"
5#include "MRIOFilters.h"
7
8#include <filesystem>
9
10namespace MR
11{
12
13namespace ObjectSave
14{
15
18MRMESH_API Expected<void> toAnySupportedSceneFormat( const Object& object, const std::filesystem::path& file,
19 ProgressCallback callback = {} );
20
24MRMESH_API Expected<void> toAnySupportedFormat( const Object& object, const std::filesystem::path& file,
25 ProgressCallback callback = {} );
26
27} // namespace ObjectSave
28
38MRMESH_API Expected<void> serializeObjectTree( const Object& object, const std::filesystem::path& path,
39 ProgressCallback progress, FolderCallback preCompress );
40MRMESH_API Expected<void> serializeObjectTree( const Object& object, const std::filesystem::path& path,
41 ProgressCallback progress = {} );
42
43} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
named object in the data model
Definition MRObject.h:60
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:576
MRMESH_API Expected< void > toAnySupportedFormat(const Object &object, const std::filesystem::path &file, ProgressCallback callback={})
MRMESH_API Expected< void > toAnySupportedSceneFormat(const Object &object, const std::filesystem::path &file, ProgressCallback callback={})
Definition MRCameraOrientationPlugin.h:8
std::function< void(const std::filesystem::path &tempFolderName)> FolderCallback
this callback will be called before compression on serialization and after decompression on deseriali...
Definition MRUniqueTemporaryFolder.h:11
tl::expected< T, E > Expected
Definition MRExpected.h:58
MRMESH_API Expected< void > serializeObjectTree(const Object &object, const std::filesystem::path &path, ProgressCallback progress, FolderCallback preCompress)
saves object subtree in given scene file (zip/mru)