Exppython:

- Window: added .GetCursorPos()
- Lamp: updated for NoDiffuse and NoSpecular modes
- Registry: new module to handle persistent data
- vector: made it correctly print only 3 values when vec->size==3:
    Fixes nmvert coords printed with a 4th 0.0 coordinate
- Text: fixed crash on startup (Python 2.3, linux):
    added definition of the Text pyobject earlier, in Types.c
This commit is contained in:
2003-09-03 04:13:08 +00:00
parent 65746ab10a
commit a09e5a7f2f
11 changed files with 330 additions and 17 deletions

View File

@@ -148,7 +148,11 @@ static PyObject *Vector_repr (VectorObject *self)
{
char buffer[100];
sprintf (buffer, "[%.3f, %.3f, %.3f, %.3f]\n",
if (self->size == 3)
sprintf (buffer, "[%.3f, %.3f, %.3f]\n",
self->vec[0], self->vec[1], self->vec[2]);
else /* assuming size == 4 */
sprintf (buffer, "[%.3f, %.3f, %.3f, %.3f]\n",
self->vec[0], self->vec[1], self->vec[2], self->vec[3]);
return PyString_FromString (buffer);