22
#include "PreCompiled.h"
26
#include <Base/Console.h>
27
#include <Base/Interpreter.h>
28
#include <Base/PyObjectBase.h>
30
#include <App/CleanupProcess.h>
32
#include "MaterialFilterPy.h"
33
#include "MaterialLoader.h"
34
#include "MaterialManagerPy.h"
35
#include "MaterialPy.h"
36
#include "ModelManagerPy.h"
37
#include "ModelPropertyPy.h"
40
#include "PropertyMaterial.h"
44
class Module: public Py::ExtensionModule<Module>
48
: Py::ExtensionModule<Module>("Materials")
50
initialize("This module is the Materials module.");
53
~Module() override = default;
60
return Base::Interpreter().addModule(new Module);
65
PyMOD_INIT_FUNC(Materials)
68
App::CleanupProcess::registerCleanup([]() {
69
Materials::MaterialManager::cleanup();
70
Materials::ModelManager::cleanup();
73
PyObject* module = Materials::initModule();
75
Base::Console().Log("Loading Material module... done\n");
77
Base::Interpreter().addType(&Materials::MaterialManagerPy::Type, module, "MaterialManager");
78
Base::Interpreter().addType(&Materials::MaterialFilterPy::Type, module, "MaterialFilter");
79
Base::Interpreter().addType(&Materials::MaterialPy::Type, module, "Material");
80
Base::Interpreter().addType(&Materials::ModelManagerPy::Type, module, "ModelManager");
81
Base::Interpreter().addType(&Materials::ModelPropertyPy::Type, module, "ModelProperty");
82
Base::Interpreter().addType(&Materials::ModelPy::Type, module, "Model");
83
Base::Interpreter().addType(&Materials::UUIDsPy::Type, module, "UUIDs");
89
Materials::Material ::init();
90
Materials::MaterialFilter ::init();
91
Materials::MaterialManager ::init();
92
Materials::Model ::init();
93
Materials::ModelManager ::init();
94
Materials::ModelUUIDs ::init();
96
Materials::LibraryBase ::init();
97
Materials::MaterialLibrary ::init();
98
Materials::ModelLibrary ::init();
99
Materials::MaterialExternalLibrary ::init();
101
Materials::ModelProperty ::init();
102
Materials::MaterialProperty ::init();
104
Materials::MaterialValue ::init();
105
Materials::Material2DArray ::init();
106
Materials::Material3DArray ::init();
108
Materials::PropertyMaterial ::init();
111
PyMOD_Return(module);