diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-05-21 13:18:42 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-05-21 13:18:42 +0400 |
commit | 1217928e662bd74980dc17c8d32797b0bc6f7002 (patch) | |
tree | 1d46e362c2e3e114ebc2f30f5a942646d0f3bfc4 /source/gameengine/Expressions | |
parent | 22883f9232da3df2bcba995bb0d84d4cf95803e8 (diff) |
Fixes for Camera objects and python:
Normalise clip planes for sphere testing.
Do a frustum-sphere <-> sphere test
Reference count all python objects (!)
Diffstat (limited to 'source/gameengine/Expressions')
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.cpp | 3 | ||||
-rw-r--r-- | source/gameengine/Expressions/Value.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp index 74468cf030d..88a38b35ad4 100644 --- a/source/gameengine/Expressions/PyObjectPlus.cpp +++ b/source/gameengine/Expressions/PyObjectPlus.cpp @@ -102,6 +102,9 @@ PyParentObject PyObjectPlus::Parents[] = {&PyObjectPlus::Type, NULL}; ------------------------------*/ PyObject *PyObjectPlus::_getattr(const STR_String& attr) { + if (attr == "__doc__" && GetType()->tp_doc) + return PyString_FromString(GetType()->tp_doc); + //if (streq(attr, "type")) // return Py_BuildValue("s", (*(GetParents()))->tp_name); diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp index 55dd1f5c1dd..07505829737 100644 --- a/source/gameengine/Expressions/Value.cpp +++ b/source/gameengine/Expressions/Value.cpp @@ -653,7 +653,7 @@ CValue* CValue::ConvertPythonToValue(PyObject* pyobj) int numitems = PyList_Size(pyobj); for (i=0;i<numitems;i++) { - PyObject* listitem = PyList_GetItem(pyobj,i); + PyObject* listitem = PyList_GetItem(pyobj,i); /* borrowed ref */ CValue* listitemval = ConvertPythonToValue(listitem); if (listitemval) { |