From e8c0440660be3523f5d6dda300158225d93145f1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 15 May 2009 02:03:27 +0000 Subject: minor change - mistake in joystick fix, util function for getting attrs from BGE types --- source/gameengine/PyDoc/GameTypes.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source/gameengine/PyDoc') diff --git a/source/gameengine/PyDoc/GameTypes.py b/source/gameengine/PyDoc/GameTypes.py index e6f5b90b5ce..0240efa4eab 100644 --- a/source/gameengine/PyDoc/GameTypes.py +++ b/source/gameengine/PyDoc/GameTypes.py @@ -5504,3 +5504,19 @@ class KX_Camera(KX_GameObject): @type right: int @type top: int """ + +# Util func to extract all attrs +""" +import types +attrs = [] +for name, val in __builtins__.locals().items(): + if name.startswith('__'): + continue + if type(val) == types.ClassType: + for line in val.__doc__.split('\n'): + if '@ivar' in line: + attrs.append(name + '::' + line.split()[1].replace(':', '')) + +for a in attrs: + print a +""" \ No newline at end of file -- cgit v1.2.3