| Code: |
|
from Blender import * scene = Scene.getCurrent() camera = scene.getCurrentCamera() imatrix = camera.getInverseMatrix() print imatrix print imatrix[0] print imatrix[1] print imatrix[2] print imatrix[3] |
| Code: |
|
((9.9419775405734622e+033, 1.0065780829052295e+034, 1.0032974180071193e+034, -1. #QNAN), (0.0, 0.0, 7.8967025252677283e+033, 1.9190860941642372e-038), (2.5783891 743576634e-043, 1.9273616023751538e-038, 7.834125275251872e+033, -1.#QNAN), (1.2 235017151712843e-040, 7.89685541086258e+033, 1.7433498142726476e-039, 7.89688202 65734247e+033)) [9.9419775405734622e+033, 1.9273548761425251e-038, 9.9419366885521658e+033, 1.60 73891110312251e-038] [9.9419540197127158e+033, 1.6108531208350361e-038, 1.9273559971812965e-038, 4.20 38953929744512e-045] [7.0064923216240854e-045, 5.6051938572992683e-044, 1.9273582392588395e-038, 1.92 73559971812965e-038] [0.0, 0.0, 0.0, 4.2038953929744512e-045] |
| Code: |
|
static PyObject *Object_getInverseMatrix(PyObject *self, PyObject *args) { Object *ob= PYBLOCK_AS_OBJECT(self); float inverse[4][4]; // <- ******************* Mat4Invert(inverse, ob->obmat); return newMatrixObject(inverse); } |
| Code: |
|
PyObject *newMatrixObject(Matrix4Ptr mat) { MatrixObject *self; self= PyObject_NEW(MatrixObject, &Matrix_Type); self->mat= mat; // <- ************************** BPY_TRY(self->rows[0]= newVectorObject(GETROWVECTOR(self->mat, 0), 4)); BPY_TRY(self->rows[1]= newVectorObject(GETROWVECTOR(self->mat, 1), 4)); BPY_TRY(self->rows[2]= newVectorObject(GETROWVECTOR(self->mat, 2), 4)); BPY_TRY(self->rows[3]= newVectorObject(GETROWVECTOR(self->mat, 3), 4)); return (PyObject*) self; } |
| jmerritt wrote: |
|
Can somebody tell me where the current Python development is being discussed? Is there a website with bits-and-pieces, a mailing list, etc? I'm subscribed to bf-committers, but there doesn't seem to have been any Python discussion for the last week or so. Is that the right place? I'd be much more motivated to try to solve problems like this if I knew that my efforts were actually focused on "current" code, and were going to be committed... Thanks, |