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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user