| 52 | } |
| 53 | |
| 54 | void ModelFormatManager::postModuleInitialisation() |
| 55 | { |
| 56 | if (!_exporters.empty()) |
| 57 | { |
| 58 | // Construct and Register the patch-related preferences |
| 59 | IPreferencePage& page = GlobalPreferenceSystem().getPage(_("Settings/Model Export")); |
| 60 | |
| 61 | ComboBoxValueList choices; |
| 62 | |
| 63 | for (const ExporterMap::value_type& pair : _exporters) |
| 64 | { |
| 65 | choices.push_back(pair.first); |
| 66 | } |
| 67 | |
| 68 | page.appendCombo(_("Export Format for scaled Models"), RKEY_DEFAULT_MODEL_EXPORT_FORMAT, choices, true); |
| 69 | |
| 70 | // Register all exporter extensions to the FileTypeRegistry |
| 71 | |
| 72 | for (const ExporterMap::value_type& pair : _exporters) |
| 73 | { |
| 74 | std::string extLower = string::to_lower_copy(pair.second->getExtension()); |
| 75 | |
| 76 | GlobalFiletypes().registerPattern(filetype::TYPE_MODEL_EXPORT, FileTypePattern( |
| 77 | pair.second->getDisplayName(), |
| 78 | extLower, |
| 79 | "*." + extLower)); |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | void ModelFormatManager::registerImporter(const IModelImporterPtr& importer) |
| 85 | { |
nothing calls this directly
no test coverage detected