11 #ifndef __GA_SaveOptions__
12 #define __GA_SaveOptions__
45 #define BOOL_ACCESSOR(NAME, GET, IMPORT, SET, DEFAULT) \
46 static const char *GET##Name() { return NAME; } \
47 bool IMPORT(bool &v) const { return importOption(NAME, v); } \
50 if (!importOption(NAME, v)) v = DEFAULT; \
53 void SET(bool v) { setOptionB(UTmakeUnsafeRef(NAME), v); }
54 #define INT_ACCESSOR(NAME, GET, IMPORT, SET, DEFAULT) \
55 static const char *GET##Name() { return NAME; } \
56 bool IMPORT(int32 &v) const { return importOption(NAME, v); } \
57 bool IMPORT(int64 &v) const { return importOption(NAME, v); } \
60 if (!importOption(NAME, v)) v = DEFAULT; \
63 void SET(int64 v) { setOptionI(UTmakeUnsafeRef(NAME), v); }
64 #define REAL_ACCESSOR(NAME, GET, IMPORT, SET, DEFAULT) \
65 static const char *GET##Name() { return NAME; } \
66 bool IMPORT(fpreal32 &v) const { return importOption(NAME, v); } \
67 bool IMPORT(fpreal64 &v) const { return importOption(NAME, v); } \
68 fpreal64 GET() const { \
70 if (!importOption(NAME, v)) v = DEFAULT; \
73 void SET(fpreal64 v) { setOptionI(UTmakeUnsafeRef(NAME), v); }
74 #define STR_ACCESSOR(NAME, GET, IMPORT, SET) \
75 static const char *GET##Name() { return NAME; } \
76 bool IMPORT(UT_StringHolder &v) const { return importOption(NAME, v); } \
77 UT_StringHolder GET() const { return getOptionS(NAME); } \
78 void SET(const UT_StringHolder &v) { setOptionS(UTmakeUnsafeRef(NAME), v); }
103 BOOL_ACCESSOR("geo:saveinfo", saveInfo, importSaveInfo, setSaveInfo, true)
104 STR_ACCESSOR("info:software", software, importSoftware, setSoftware)
105 STR_ACCESSOR("info:artist", artist, importArtist, setArtist)
106 STR_ACCESSOR("info:hostname", hostname, importHostname, setHostname)
107 STR_ACCESSOR("info:comment", comment, importComment, setComment)
125 BOOL_ACCESSOR("geo:blosc", blosc, importBlosc, setBlosc, false)
130 BOOL_ACCESSOR("geo:savegroups", saveGroups, importSaveGroups,
137 importSavePointGroups, setSavePointGroups, true)
142 importSaveVertexGroups, setSaveVertexGroups, true)
147 importSaveEdgeGroups, setSaveEdgeGroups, true)
152 BOOL_ACCESSOR("geo:rlebits", rleBits, importRleBits, setRleBits, true)
158 importSavePaged, setSavePaged, true)
167 importConstPageCheck, setConstPageCheck, 2)
172 BOOL_ACCESSOR("geo:saveprimitivegroups", savePrimitiveGroups,
173 importSavePrimitiveGroups, setSavePrimitiveGroups, true)
178 BOOL_ACCESSOR("geo:primrun", primRun, importPrimRun, setPrimRun, true)
185 importPrimRunQueue, setPrimRunQueue, 4)
193 importSkipSaveIndex, setSkipSaveIndex, false)
205 importAddNormalsTo, setAddNormalsTo, -1)
213 importConvertLOD, setConvertLOD, 1)
221 importSaveInternal, setSaveInternal, false)
227 importIgnoreAttribScope, setIgnoreAttribScope, false)
const UT_Options & operator=(const UT_Options &src)
Assignment operator.
const GLuint GLenum const void * binary
GLint GLint GLsizei GLint GLenum format
#define STR_ACCESSOR(NAME, GET, IMPORT, SET)
A map of string to various well defined value types.
#define BOOL_ACCESSOR(NAME, GET, IMPORT, SET, DEFAULT)
#define REAL_ACCESSOR(NAME, GET, IMPORT, SET, DEFAULT)
#define INT_ACCESSOR(NAME, GET, IMPORT, SET, DEFAULT)
OIIO_UTIL_API std::string extension(string_view filepath, bool include_dot=true) noexcept
GA_SaveOptions & operator=(const UT_Options &opts)