diff options
author | Joseph Gilbert <ascotan@gmail.com> | 2004-05-15 07:09:27 +0400 |
---|---|---|
committer | Joseph Gilbert <ascotan@gmail.com> | 2004-05-15 07:09:27 +0400 |
commit | 23637ccdd7befb3105f9f629b9ab86f0ba8d16b3 (patch) | |
tree | abe22e237f5d133a37ef5e02e06c405381047ffa /source | |
parent | d00ad69b06b48807e82c9500b9afc0f9496a7e36 (diff) |
- bugfix #998 Object matrix incorrect
- object's matrix is not updated until redraw. pymatrix returned is updated to reflect current variables.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/api2_2x/Object.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 8ac9085eb6b..91cd24c345b 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -777,11 +777,9 @@ static PyObject *Object_getEuler (BPy_Object *self) static PyObject *Object_getInverseMatrix (BPy_Object *self) { MatrixObject *inverse = (MatrixObject *)newMatrixObject(NULL, 4, 4); - Mat4Invert (*inverse->matrix, self->object->obmat); return ((PyObject *)inverse); - } static PyObject *Object_getIpo(BPy_Object *self) @@ -818,11 +816,12 @@ static PyObject *Object_getMaterials (BPy_Object *self) static PyObject *Object_getMatrix (BPy_Object *self) { - Object * ob; + PyObject * matrix; - ob = self->object; + matrix = newMatrixObject(NULL, 4, 4); + object_to_mat4(self->object, *((MatrixObject*)matrix)->matrix); - return (PyObject*)newMatrixObject((float*)ob->obmat, 4, 4); + return matrix; } static PyObject *Object_getName (BPy_Object *self) |