* KX_PythonSeq - comparisons work again. eg. act1.sensors == act2.sensors, had to copy Py_CmpToRich inline grr!, mailed python-dev about this.

* Shift-Click on states in the logic UI works again.
* New Logic Space has all the view options pressed.
This commit is contained in:
2009-09-02 20:46:28 +00:00
parent 21af438ef8
commit e80b37cd75
4 changed files with 64 additions and 28 deletions

View File

@@ -2018,4 +2018,42 @@ void resetGamePythonPath()
}
/* Copied from pythons 3's Object.c
* also in blenders bpy_uitl.c, mailed the python-dev
* list about enabling something like this again for py3 */
PyObject *
Py_CmpToRich(int op, int cmp)
{
PyObject *res;
int ok;
if (PyErr_Occurred())
return NULL;
switch (op) {
case Py_LT:
ok = cmp < 0;
break;
case Py_LE:
ok = cmp <= 0;
break;
case Py_EQ:
ok = cmp == 0;
break;
case Py_NE:
ok = cmp != 0;
break;
case Py_GT:
ok = cmp > 0;
break;
case Py_GE:
ok = cmp >= 0;
break;
default:
PyErr_BadArgument();
return NULL;
}
res = ok ? Py_True : Py_False;
Py_INCREF(res);
return res;
}