Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Pogribnyi <pogribnyi@gmail.com>2014-07-11 01:02:13 +0400
committerRoman Pogribnyi <pogribnyi@gmail.com>2014-07-11 01:02:13 +0400
commit41a28c2106481fdcd8912046f1efda4c09c947ef (patch)
treea1dce81fa8f110d87afd7bfaaddd92cb2fcb4160 /source/blender
parent8c3aedcec5df97d7b46270dd89cc9d77c17ac77e (diff)
Compiling intermediate files for linking c++ code from bpy_interface.c
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/python/intern/bpy_interface.c2
-rw-r--r--source/blender/python/manta_pp/CMakeLists.txt1
-rw-r--r--source/blender/python/manta_pp/general.h1
-rw-r--r--source/blender/python/manta_pp/pwrapper/manta.h2
-rw-r--r--source/blender/python/manta_pp/pwrapper/manta_api.cpp14
-rw-r--r--source/blender/python/manta_pp/pwrapper/manta_api.h3
-rw-r--r--source/blender/python/manta_pp/pwrapper/registry.cpp2
-rw-r--r--source/blender/python/manta_pp/pwrapper/registry.h2
8 files changed, 23 insertions, 4 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 89f39fe796c..6e5593fe01f 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -222,7 +222,7 @@ static struct _inittab bpy_internal_modules[] = {
{(char *)"bgl", BPyInit_bgl},
{(char *)"blf", BPyInit_blf},
{(char *)"bmesh", BPyInit_bmesh},
- {(char *)"manta", PyInit_Main},
+ {(char *)"manta", PyInit_Manta},
// {(char *)"bmesh.types", BPyInit_bmesh_types},
// {(char *)"bmesh.utils", BPyInit_bmesh_utils},
// {(char *)"bmesh.utils", BPyInit_bmesh_geometry},
diff --git a/source/blender/python/manta_pp/CMakeLists.txt b/source/blender/python/manta_pp/CMakeLists.txt
index d58c81ccfc6..a3864264167 100644
--- a/source/blender/python/manta_pp/CMakeLists.txt
+++ b/source/blender/python/manta_pp/CMakeLists.txt
@@ -212,6 +212,7 @@ pwrapper/pythonInclude.h
pwrapper/registry.cpp
pwrapper/registry.h
pwrapper/manta_api.h
+pwrapper/manta_api.cpp
python/defines.py.reg.cpp
diff --git a/source/blender/python/manta_pp/general.h b/source/blender/python/manta_pp/general.h
index a4ac58a9635..9fc676654da 100644
--- a/source/blender/python/manta_pp/general.h
+++ b/source/blender/python/manta_pp/general.h
@@ -130,6 +130,7 @@ template<class T> inline T clamp(const T& val, const T& vmin, const T& vmax) {
return val;
}
+ int test_test(){return 55;}
template<class T> inline T nmod(const T& a, const T& b);
template<> inline int nmod(const int& a, const int& b) { int c=a%b; return (c<0) ? (c+b) : c; }
template<> inline float nmod(const float& a, const float& b) { float c=std::fmod(a,b); return (c<0) ? (c+b) : c; }
diff --git a/source/blender/python/manta_pp/pwrapper/manta.h b/source/blender/python/manta_pp/pwrapper/manta.h
index e6905bdbadd..ac0dbd35c4a 100644
--- a/source/blender/python/manta_pp/pwrapper/manta.h
+++ b/source/blender/python/manta_pp/pwrapper/manta.h
@@ -23,8 +23,8 @@
//! @defgroup Plugins Plugins
//! @defgroup PyClasses Classes exposed to Python
-#include "../general.h"
#include "../util/vectorbase.h"
+#include "../general.h"
#include "registry.h"
#include "pclass.h"
#include "pconvert.h"
diff --git a/source/blender/python/manta_pp/pwrapper/manta_api.cpp b/source/blender/python/manta_pp/pwrapper/manta_api.cpp
new file mode 100644
index 00000000000..27532299ba0
--- /dev/null
+++ b/source/blender/python/manta_pp/pwrapper/manta_api.cpp
@@ -0,0 +1,14 @@
+#include "Python.h"
+#include "manta_api.h"
+#include "../manta.h"
+
+//#ifdef __cplusplus
+//extern "C" {
+//#endif
+ PyObject * PyInit_Manta(void)
+ {
+ return Pb::PyInit_Main();
+ }
+//#ifdef __cplusplus
+//}
+//#endif \ No newline at end of file
diff --git a/source/blender/python/manta_pp/pwrapper/manta_api.h b/source/blender/python/manta_pp/pwrapper/manta_api.h
index 8a62db33da2..481e3b26c1e 100644
--- a/source/blender/python/manta_pp/pwrapper/manta_api.h
+++ b/source/blender/python/manta_pp/pwrapper/manta_api.h
@@ -1,4 +1,5 @@
#ifndef _MANTA_API_H_
#define _MANTA_API_H_
-PyObject * PyInit_Main(void);
+//#include "pythonInclude.h"
+PyObject * PyInit_Manta(void);
#endif
diff --git a/source/blender/python/manta_pp/pwrapper/registry.cpp b/source/blender/python/manta_pp/pwrapper/registry.cpp
index 604b78f91ee..3dce5b00342 100644
--- a/source/blender/python/manta_pp/pwrapper/registry.cpp
+++ b/source/blender/python/manta_pp/pwrapper/registry.cpp
@@ -168,7 +168,7 @@ namespace Pb {
}
//PyMODINIT_FUNC PyInit_Main(void) {
-extern "C" PyObject *PyInit_Main(void) {
+PyObject *PyInit_Main(void) {
WrapperRegistry::instance().construct_lite();
#if PY_MAJOR_VERSION >= 3
return WrapperRegistry::instance().initModule();
diff --git a/source/blender/python/manta_pp/pwrapper/registry.h b/source/blender/python/manta_pp/pwrapper/registry.h
index 9fe7fbc7bf4..6fb47431728 100644
--- a/source/blender/python/manta_pp/pwrapper/registry.h
+++ b/source/blender/python/manta_pp/pwrapper/registry.h
@@ -44,6 +44,7 @@ template<class T> struct Namify {
static const char* S;
};
}
+
namespace Pb {
// internal registry access
void setup(const std::string& filename, const std::vector<std::string>& args);
@@ -53,6 +54,7 @@ Manta::PbClass* objFromPy(PyObject* obj);
Manta::PbClass* createPy(const std::string& classname, const std::string& name, Manta::PbArgs& args, Manta::PbClass* parent);
void setReference(Manta::PbClass* cls, PyObject* obj);
PyObject* copyObject(Manta::PbClass* cls, const std::string& classname);
+PyObject *PyInit_Main(void);
// callback type
typedef void (*InitFunc)(PyObject*);