[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20209] trunk/blender/source/gameengine: minor change - mistake in joystick fix, util function for getting attrs from BGE types
Campbell Barton
ideasman42 at gmail.com
Fri May 15 04:03:29 CEST 2009
Revision: 20209
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20209
Author: campbellbarton
Date: 2009-05-15 04:03:27 +0200 (Fri, 15 May 2009)
Log Message:
-----------
minor change - mistake in joystick fix, util function for getting attrs from BGE types
Modified Paths:
--------------
trunk/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
trunk/blender/source/gameengine/PyDoc/GameTypes.py
Modified: trunk/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp 2009-05-14 23:06:05 UTC (rev 20208)
+++ trunk/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp 2009-05-15 02:03:27 UTC (rev 20209)
@@ -249,7 +249,7 @@
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
Modified: trunk/blender/source/gameengine/PyDoc/GameTypes.py
===================================================================
--- trunk/blender/source/gameengine/PyDoc/GameTypes.py 2009-05-14 23:06:05 UTC (rev 20208)
+++ trunk/blender/source/gameengine/PyDoc/GameTypes.py 2009-05-15 02:03:27 UTC (rev 20209)
@@ -5504,3 +5504,19 @@
@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
More information about the Bf-blender-cvs
mailing list