* Object_getInverseMatrix now returns a correct matrix.
The problem was that the memory was allocated at the stack, but after the Python object was created, the pointer to the memory goes invalid. Thanks to Kester Maddoc for providing a patch - almost 2 weeks ago. Ouch, I should read my mail a little bit better.
This commit is contained in:
@@ -697,11 +697,11 @@ static PyObject *Object_getEuler (BPy_Object *self)
|
||||
|
||||
static PyObject *Object_getInverseMatrix (BPy_Object *self)
|
||||
{
|
||||
float inverse[4][4];
|
||||
MatrixObject *inverse = (MatrixObject *)newMatrixObject (NULL);
|
||||
|
||||
Mat4Invert (inverse->mem, self->object->obmat);
|
||||
|
||||
Mat4Invert (inverse, self->object->obmat);
|
||||
|
||||
return (newMatrixObject (inverse));
|
||||
return ((PyObject *)inverse);
|
||||
}
|
||||
|
||||
static PyObject *Object_getLocation (BPy_Object *self, PyObject *args)
|
||||
|
Reference in New Issue
Block a user