1
/***************************************************************************
3
* This program is free software; you can redistribute it and/or modify *
4
* it under the terms of the GNU Library General Public License as *
5
* published by the Free Software Foundation; either version 2 of the *
6
* License, or (at your option) any later version. *
7
* for detail see the LICENCE text file. *
10
***************************************************************************/
12
#include "PreCompiled.h"
14
#include <Base/Console.h>
15
#include <Base/Interpreter.h>
16
#include <Base/PyObjectBase.h>
18
#include "FeatureClip.h"
19
#include "FeaturePage.h"
20
#include "FeatureProjection.h"
21
#include "FeatureView.h"
22
#include "FeatureViewAnnotation.h"
23
#include "FeatureViewPart.h"
24
#include "FeatureViewSpreadsheet.h"
25
#include "FeatureViewSymbol.h"
31
extern PyObject* initModule();
35
PyMOD_INIT_FUNC(Drawing)
37
// load dependent module
39
Base::Interpreter().loadModule("Part");
40
// Base::Interpreter().loadModule("Mesh");
42
catch (const Base::Exception& e) {
43
PyErr_SetString(PyExc_ImportError, e.what());
44
PyMOD_Return(nullptr);
46
PyObject* mod = Drawing::initModule();
47
Base::Console().Log("Loading Drawing module... done\n");
50
// NOTE: To finish the initialization of our own type objects we must
51
// call PyType_Ready, otherwise we run into a segmentation fault, later on.
52
// This function is responsible for adding inherited slots from a type's base class.
54
Drawing::FeaturePage ::init();
55
Drawing::FeatureView ::init();
56
Drawing::FeatureViewPart ::init();
57
Drawing::PageGroup ::init();
58
Drawing::FeatureProjection ::init();
59
Drawing::FeatureViewPartPython ::init();
60
Drawing::FeatureViewPython ::init();
61
Drawing::FeatureViewAnnotation ::init();
62
Drawing::FeatureViewSymbol ::init();
63
Drawing::FeatureClip ::init();
64
Drawing::FeatureViewSpreadsheet ::init();