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:
authorMitchell Stokes <mogurijin@gmail.com>2012-01-22 09:45:56 +0400
committerMitchell Stokes <mogurijin@gmail.com>2012-01-22 09:45:56 +0400
commit57d48d4493a78d2886f83a28fe66c2654bed4f6c (patch)
tree205e5116b6f6dd9f6031fb1a858559a240b6abbf /source/gameengine/GameLogic/SCA_PythonKeyboard.h
parent4ec5a9a42c00d65898e8a4aef5b73409a5e1785f (diff)
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).
Diffstat (limited to 'source/gameengine/GameLogic/SCA_PythonKeyboard.h')
-rw-r--r--source/gameengine/GameLogic/SCA_PythonKeyboard.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_PythonKeyboard.h b/source/gameengine/GameLogic/SCA_PythonKeyboard.h
index 7ecf76d1581..f44bb40e13c 100644
--- a/source/gameengine/GameLogic/SCA_PythonKeyboard.h
+++ b/source/gameengine/GameLogic/SCA_PythonKeyboard.h
@@ -43,6 +43,7 @@ public:
#ifdef WITH_PYTHON
static PyObject* pyattr_get_events(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+ static PyObject* pyattr_get_active_events(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
#endif
};