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

Method registerModule

plugins/script/PythonModule.cpp:85–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void PythonModule::registerModule()
86{
87 rMessage() << "Registering darkradiant module to Python using pybind11 version " <<
88 PYBIND11_VERSION_STR << std::endl;
89
90 // Register the darkradiant module to Python, the InitModule function
91 // will be called as soon as the module is imported
92 int result = PyImport_AppendInittab(ModuleName, InitModule);
93
94 if (result == -1)
95 {
96 rError() << "Could not initialise Python module" << std::endl;
97 return;
98 }
99}
100
101ExecutionResultPtr PythonModule::executeString(const std::string& scriptString)
102{

Calls 2

rMessageFunction · 0.85
rErrorFunction · 0.85

Tested by 1

setupTestModulesMethod · 0.36