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:
authorCampbell Barton <ideasman42@gmail.com>2009-08-27 20:34:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-08-27 20:34:13 +0400
commit28392eedbefe1bf9322d30d8697128b2dafb55d5 (patch)
tree01877391e5dae8834501d6099c51645513e5e050 /source/gameengine/Expressions/PyObjectPlus.h
parent2c7065e541f1ea51dbeea045bc3214ce22d4ca82 (diff)
was casting the PyObjectPlus type to a PyObject for new BGE vector and matrix types, need to get its proxy instead.
Diffstat (limited to 'source/gameengine/Expressions/PyObjectPlus.h')
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index e9e81dddaaa..f9edb7877b0 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -86,7 +86,7 @@ typedef struct {
-typedef struct {
+typedef struct PyObjectPlus_Proxy {
PyObject_HEAD /* required python macro */
class PyObjectPlus *ref;
bool py_owns;
@@ -99,6 +99,9 @@ typedef struct {
/* Note, sometimes we dont care what BGE type this is as long as its a proxy */
#define BGE_PROXY_CHECK_TYPE(_type) ((_type)->tp_dealloc == PyObjectPlus::py_base_dealloc)
+/* Opposite of BGE_PROXY_REF */
+#define BGE_PROXY_FROM_REF(_self) (((PyObjectPlus *)_self)->GetProxy())
+
// This must be the first line of each
// PyC++ class