diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-21 03:17:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-21 03:17:52 +0400 |
commit | 217bbb7800679899302ddb058f9ceea1d00c7ce1 (patch) | |
tree | 05cef2f2d94dc0af0cbf027c233f5d35ff782eee /source/gameengine/GameLogic/SCA_KeyboardSensor.cpp | |
parent | 2d0d06f642b661b084657c05ebb0c664f998a937 (diff) |
BGE Python API
Separate getting a normal attribute and getting __dict__, was having to do too a check for __dict__ on each class (multiple times per getattro call from python) when its not used that often.
Diffstat (limited to 'source/gameengine/GameLogic/SCA_KeyboardSensor.cpp')
-rw-r--r-- | source/gameengine/GameLogic/SCA_KeyboardSensor.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp index c946156283f..96969dc6dc7 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp @@ -664,12 +664,15 @@ PyAttributeDef SCA_KeyboardSensor::Attributes[] = { { NULL } //Sentinel }; -PyObject* -SCA_KeyboardSensor::py_getattro(PyObject *attr) +PyObject* SCA_KeyboardSensor::py_getattro(PyObject *attr) { py_getattro_up(SCA_ISensor); } +PyObject* SCA_KeyboardSensor::py_getattro_dict() { + py_getattro_dict_up(SCA_ISensor); +} + int SCA_KeyboardSensor::py_setattro(PyObject *attr, PyObject *value) { py_setattro_up(SCA_ISensor); |