MCPcopy Create free account
hub / github.com/assimp/assimp / GetImporterInstanceList

Function GetImporterInstanceList

code/Common/ImporterRegistry.cpp:215–391  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

213
214// ------------------------------------------------------------------------------------------------
215void GetImporterInstanceList(std::vector<BaseImporter *> &out) {
216
217 // Some importers may be unimplemented or otherwise unsuitable for general use
218 // in their current state. Devs can set ASSIMP_ENABLE_DEV_IMPORTERS in their
219 // local environment to enable them, otherwise they're left out of the registry.
220#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
221 // not supported under uwp
222 const char *envStr = std::getenv("ASSIMP_ENABLE_DEV_IMPORTERS");
223#else
224 const char *envStr = { "0" };
225#endif
226 bool devImportersEnabled = envStr && strcmp(envStr, "0");
227
228 // Ensure no unused var warnings if all uses are #ifndef'd away below:
229 (void)devImportersEnabled;
230
231 // ----------------------------------------------------------------------------
232 // Add an instance of each worker class here
233 // (register_new_importers_here)
234 // ----------------------------------------------------------------------------
235 out.reserve(64);
236#if !defined(ASSIMP_BUILD_NO_USD_IMPORTER)
237 out.push_back(new USDImporter());
238#endif
239#if (!defined ASSIMP_BUILD_NO_X_IMPORTER)
240 out.push_back(new XFileImporter());
241#endif
242#if (!defined ASSIMP_BUILD_NO_OBJ_IMPORTER)
243 out.push_back(new ObjFileImporter());
244#endif
245#ifndef ASSIMP_BUILD_NO_AMF_IMPORTER
246 out.push_back(new AMFImporter());
247#endif
248#if (!defined ASSIMP_BUILD_NO_3DS_IMPORTER)
249 out.push_back(new Discreet3DSImporter());
250#endif
251#if (!defined ASSIMP_BUILD_NO_M3D_IMPORTER)
252 out.push_back(new M3DImporter());
253#endif
254#if (!defined ASSIMP_BUILD_NO_MD3_IMPORTER)
255 out.push_back(new MD3Importer());
256#endif
257#if (!defined ASSIMP_BUILD_NO_MD2_IMPORTER)
258 out.push_back(new MD2Importer());
259#endif
260#if (!defined ASSIMP_BUILD_NO_PLY_IMPORTER)
261 out.push_back(new PLYImporter());
262#endif
263#if (!defined ASSIMP_BUILD_NO_MDL_IMPORTER)
264 out.push_back(new MDLImporter());
265#endif
266#if (!defined ASSIMP_BUILD_NO_ASE_IMPORTER)
267#if (!defined ASSIMP_BUILD_NO_3DS_IMPORTER)
268 out.push_back(new ASEImporter());
269#endif
270#endif
271#if (!defined ASSIMP_BUILD_NO_HMP_IMPORTER)
272 out.push_back(new HMPImporter());

Callers 2

aiGetImporterDescFunction · 0.85
ImporterMethod · 0.85

Calls 2

reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected