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/Ketsji/KX_Scene.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/Ketsji/KX_Scene.h')
-rw-r--r--source/gameengine/Ketsji/KX_Scene.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h
index 962db1a9b96..d1da44c600e 100644
--- a/source/gameengine/Ketsji/KX_Scene.h
+++ b/source/gameengine/Ketsji/KX_Scene.h
@@ -565,6 +565,15 @@ public:
KX_PYMETHOD_DOC(KX_Scene, setSceneViewport);
*/
+ /* attributes */
+ static PyObject* pyattr_get_name(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+ static PyObject* pyattr_get_objects(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+ static PyObject* pyattr_get_active_camera(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+
+ /* for dir(), python3 uses __dir__() */
+ static PyObject* pyattr_get_dir_dict(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+
+
virtual PyObject* _getattr(const char *attr); /* name, active_camera, gravity, suspended, viewport, framing, activity_culling, activity_culling_radius */
virtual int _setattr(const char *attr, PyObject *pyvalue);
virtual int _delattr(const char *attr);