diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-04 13:54:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-04 13:54:05 +0400 |
commit | b6114be5e388a4f3a1edf75ccbcb7121e88cad33 (patch) | |
tree | ba16b72a1fd3af436ddbb5c200aa972e192fbab0 | |
parent | a35a8f7a382e9f62834eaf355d448205665a07bc (diff) |
include PyObjectPlus method in __dict__
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp index ac1871300d0..03afa62a6da 100644 --- a/source/gameengine/Expressions/PyObjectPlus.cpp +++ b/source/gameengine/Expressions/PyObjectPlus.cpp @@ -110,6 +110,9 @@ PyObject *PyObjectPlus::py_getattro(PyObject* attr) { PyObject *descr = PyDict_GetItem(Type.tp_dict, attr); \ if (descr == NULL) { + if (strcmp(PyString_AsString(attr), "__dict__")==0) { + return py_getattr_dict(NULL, Methods, NULL); /* no Attributes yet */ + } PyErr_SetString(PyExc_AttributeError, "attribute not found"); return NULL; } else { |