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-05-15 06:03:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-05-15 06:03:27 +0400
commite8c0440660be3523f5d6dda300158225d93145f1 (patch)
tree390c1e2ee464f6332859c85a87b1fea8ce7ad1d0
parent0e423e5bb61cdce77aa6cd527f6bf2521b9b33c6 (diff)
minor change - mistake in joystick fix, util function for getting attrs from BGE types
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp2
-rw-r--r--source/gameengine/PyDoc/GameTypes.py16
2 files changed, 17 insertions, 1 deletions
diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
index c32ff303aea..b19424f20e9 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
+++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
@@ -249,7 +249,7 @@ bool SCA_Joystick::CreateJoystickDevice(void)
else if (m_axismax < 0) m_axismax = 0;
if(m_buttonmax<0) m_buttonmax= 0;
- if(m_hatmax<0) m_buttonmax= 0;
+ if(m_hatmax<0) m_hatmax= 0;
}
return true;
#endif
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