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-04-03 06:16:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-03 06:16:56 +0400
commitb22705f1694f83756f7ca785b6f20caf353f5998 (patch)
treed7a8561e3fba5232fbe7347d4e39dc95c9d601b5 /source/gameengine/Expressions/PyObjectPlus.h
parent2178fcea6e2412db4d919f00b00cd5965bcbe27e (diff)
BGE Python
- Bugfix for running dir() on all BGE python objects. was not getting the immediate methods and attributes for each class. - Use attributes for KX_Scene (so they are included with dir()) - Override __dict__ attributes for KX_Scene and KX_GameObject so custom properties are included with a dir()
Diffstat (limited to 'source/gameengine/Expressions/PyObjectPlus.h')
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index 6ba80255aa3..345eb8c9c3f 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -100,9 +100,8 @@ static inline void Py_Fatal(const char *M) {
PyErr_Clear(); \
rvalue = Parent::_getattr(attr); \
} \
- if ((rvalue == NULL) && !strcmp(attr, "__dict__")) {\
- PyErr_Clear(); \
- rvalue = _getattr_dict(Parent::_getattr(attr), Methods, Attributes); \
+ if (strcmp(attr, "__dict__")==0) {\
+ rvalue = _getattr_dict(rvalue, Methods, Attributes); \
} \
return rvalue; \