BGE Python API
- More verbose error messages. - BL_Shader wasnt setting error messages on some errors - FilterNormal depth attribute was checking for float which is bad because scripts often expect ints assigned to float attributes. - Added a check to PyVecTo for a tuple rather then always using a generic python sequence. On my system this is over 2x faster with an optmized build.
This commit is contained in:
@@ -590,7 +590,7 @@ KX_PYMETHODDEF_DOC_O(SCA_KeyboardSensor, getKeyStatus,
|
||||
"\tGet the given key's status (KX_NO_INPUTSTATUS, KX_JUSTACTIVATED, KX_ACTIVE or KX_JUSTRELEASED).\n")
|
||||
{
|
||||
if (!PyInt_Check(value)) {
|
||||
PyErr_SetString(PyExc_ValueError, "getKeyStatus expected an int");
|
||||
PyErr_SetString(PyExc_ValueError, "sensor.getKeyStatus(int): Keyboard Sensor, expected an int");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -598,7 +598,7 @@ KX_PYMETHODDEF_DOC_O(SCA_KeyboardSensor, getKeyStatus,
|
||||
|
||||
if ((keycode < SCA_IInputDevice::KX_BEGINKEY)
|
||||
|| (keycode > SCA_IInputDevice::KX_ENDKEY)){
|
||||
PyErr_SetString(PyExc_AttributeError, "invalid keycode specified!");
|
||||
PyErr_SetString(PyExc_AttributeError, "sensor.getKeyStatus(int): Keyboard Sensor, invalid keycode specified!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user