MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / postModuleInitialisation

Method postModuleInitialisation

radiantcore/model/ModelFormatManager.cpp:54–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void 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
84void ModelFormatManager::registerImporter(const IModelImporterPtr& importer)
85{

Callers

nothing calls this directly

Calls 9

to_lower_copyFunction · 0.85
FileTypePatternClass · 0.85
getPageMethod · 0.80
appendComboMethod · 0.80
registerPatternMethod · 0.80
_Function · 0.50
emptyMethod · 0.45
push_backMethod · 0.45
getDisplayNameMethod · 0.45

Tested by

no test coverage detected