11 #ifndef __GA_LoadOptions__
12 #define __GA_LoadOptions__
33 #define BOOL_ACCESSOR(NAME, GET, IMPORT, SET, DEFAULT) \
34 static const char *GET##Name() { return NAME; } \
35 bool IMPORT(bool &v) const { return importOption(NAME, v); } \
38 if (!importOption(NAME, v)) v = DEFAULT; \
41 void SET(bool v) { setOptionB(UTmakeUnsafeRef(NAME), v); }
42 #define INT_ACCESSOR(NAME, GET, IMPORT, SET, DEFAULT) \
43 static const char *GET##Name() { return NAME; } \
44 bool IMPORT(int32 &v) const { return importOption(NAME, v); } \
45 bool IMPORT(int64 &v) const { return importOption(NAME, v); } \
48 if (!importOption(NAME, v)) v = DEFAULT; \
51 void SET(int64 v) { setOptionI(UTmakeUnsafeRef(NAME), v); }
52 #define REAL_ACCESSOR(NAME, GET, IMPORT, SET, DEFAULT) \
53 static const char *GET##Name() { return NAME; } \
54 bool IMPORT(fpreal32 &v) const { return importOption(NAME, v); } \
55 bool IMPORT(fpreal64 &v) const { return importOption(NAME, v); } \
56 fpreal64 GET() const { \
58 if (!importOption(NAME, v)) v = DEFAULT; \
61 void SET(fpreal64 v) { setOptionI(UTmakeUnsafeRef(NAME), v); }
62 #define STR_ACCESSOR(NAME, GET, IMPORT, SET) \
63 static const char *GET##Name() { return NAME; } \
64 bool IMPORT(UT_StringHolder &v) const { return importOption(NAME, v); } \
65 UT_StringHolder GET() const { return getOptionS(NAME); } \
66 void SET(const UT_StringHolder &v) { setOptionS(UTmakeUnsafeRef(NAME), v); }
73 BOOL_ACCESSOR(
"geo:readonly", readOnly, importReadOnly, setReadOnly,
false)
79 STR_ACCESSOR("fileversion", fileversion, importFileVersion, setFileversion)
87 attributeLoadMask, importAttributeLoadMask, setAttributeLoadMask)
94 importGroupLoadMask, setGroupLoadMask)
100 importLoadPrimitives, setLoadPrimitives, true)
106 importDisableWarnings, setDisableWarnings, false)
114 importClassicXlateFile, setClassicXlateFile)
120 importDelayLoad, setDelayLoad, false)
127 STR_ACCESSOR("geo:overridePackedViewportLOD", overridePackedViewportLOD,
128 importOverridePackedViewportLOD, setOverridePackedViewportLOD)
const UT_Options & operator=(const UT_Options &src)
Assignment operator.
#define BOOL_ACCESSOR(NAME, GET, IMPORT, SET, DEFAULT)
A map of string to various well defined value types.
#define STR_ACCESSOR(NAME, GET, IMPORT, SET)
GA_LoadOptions & operator=(const UT_Options &opts)
Class to specify options for loading geometry.