Blender Git Commit Log
Git Commits -> Revision 57d48d4
Revision 57d48d4 by Mitchell Stokes (master) January 22, 2012, 05:45 (GMT) |
Committing patch "[#29763] Adding an active_events property to SCA_PythonKeyboard and SCA_PythonMouse" Here is the description: As the summary says, this patch adds a new event to both SCA_PythonKeyboard and SCA_PythonMouse. This property is similar to the events property that both have, but it only returns events which are not KX_NO_INPUTSTATUS. This moves the "no input" check from Python to C, which gave my input handling code a 2x speed up. Python sucks (performance-wise) with iterating lists and SCA_PythonKeyboard has close to 200 events (I think something like 177, but I don't know for sure). |
Commit Details:
Full Hash: 57d48d4493a78d2886f83a28fe66c2654bed4f6c
SVN Revision: 43598
Parent Commit: 4ec5a9a
Lines Changed: +49, -0
5 Modified Paths:
/doc/python_api/rst/bge.types.rst (+12, -0) (Diff)
/source/gameengine/GameLogic/SCA_PythonKeyboard.cpp (+18, -0) (Diff)
/source/gameengine/GameLogic/SCA_PythonKeyboard.h (+1, -0) (Diff)
/source/gameengine/GameLogic/SCA_PythonMouse.cpp (+17, -0) (Diff)
/source/gameengine/GameLogic/SCA_PythonMouse.h (+1, -0) (Diff)
/source/gameengine/GameLogic/SCA_PythonKeyboard.cpp (+18, -0) (Diff)
/source/gameengine/GameLogic/SCA_PythonKeyboard.h (+1, -0) (Diff)
/source/gameengine/GameLogic/SCA_PythonMouse.cpp (+17, -0) (Diff)
/source/gameengine/GameLogic/SCA_PythonMouse.h (+1, -0) (Diff)