diff options
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.cpp | 10 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_PyMath.cpp | 34 |
2 files changed, 22 insertions, 22 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp index 903ac70c27a..024d155fec4 100644 --- a/source/gameengine/Expressions/PyObjectPlus.cpp +++ b/source/gameengine/Expressions/PyObjectPlus.cpp @@ -421,18 +421,18 @@ PyObject *PyObjectPlus::py_get_attrdef(PyObject *self_py, const PyAttributeDef * #ifdef USE_MATHUTILS return newMatrixObject(val, attrdef->m_imin, attrdef->m_imax, Py_WRAP, NULL); #else - PyObject* rowlist = PyList_New(attrdef->m_imin); + PyObject* collist = PyList_New(attrdef->m_imin); for (unsigned int i=0; i<attrdef->m_imin; i++) { - PyObject* collist = PyList_New(attrdef->m_imax); + PyObject* col = PyList_New(attrdef->m_imax); for (unsigned int j=0; j<attrdef->m_imax; j++) { - PyList_SET_ITEM(collist,j,PyFloat_FromDouble(val[j])); + PyList_SET_ITEM(col,j,PyFloat_FromDouble(val[j])); } - PyList_SET_ITEM(rowlist,i,collist); + PyList_SET_ITEM(collist,i,col); val += attrdef->m_imax; } - return rowlist; + return collist; #endif } } diff --git a/source/gameengine/Ketsji/KX_PyMath.cpp b/source/gameengine/Ketsji/KX_PyMath.cpp index aef29286f4e..5f4bd582d21 100644 --- a/source/gameengine/Ketsji/KX_PyMath.cpp +++ b/source/gameengine/Ketsji/KX_PyMath.cpp @@ -103,20 +103,20 @@ PyObject* PyObjectFrom(const MT_Matrix4x4 &mat) mat.getValue(fmat); return newMatrixObject(fmat, 4, 4, Py_NEW, NULL); #else - PyObject *list = PyList_New(4); - PyObject *sublist; + PyObject *collist = PyList_New(4); + PyObject *col; int i; for(i=0; i < 4; i++) { - sublist = PyList_New(4); - PyList_SET_ITEM(sublist, 0, PyFloat_FromDouble(mat[i][0])); - PyList_SET_ITEM(sublist, 1, PyFloat_FromDouble(mat[i][1])); - PyList_SET_ITEM(sublist, 2, PyFloat_FromDouble(mat[i][2])); - PyList_SET_ITEM(sublist, 3, PyFloat_FromDouble(mat[i][3])); - PyList_SET_ITEM(list, i, sublist); + col = PyList_New(4); + PyList_SET_ITEM(col, 0, PyFloat_FromDouble(mat[0][i])); + PyList_SET_ITEM(col, 1, PyFloat_FromDouble(mat[1][i])); + PyList_SET_ITEM(col, 2, PyFloat_FromDouble(mat[2][i])); + PyList_SET_ITEM(col, 3, PyFloat_FromDouble(mat[3][i])); + PyList_SET_ITEM(collist, i, col); } - return list; + return collist; #endif } @@ -127,19 +127,19 @@ PyObject* PyObjectFrom(const MT_Matrix3x3 &mat) mat.getValue3x3(fmat); return newMatrixObject(fmat, 3, 3, Py_NEW, NULL); #else - PyObject *list = PyList_New(3); - PyObject *sublist; + PyObject *collist = PyList_New(3); + PyObject *col; int i; for(i=0; i < 3; i++) { - sublist = PyList_New(3); - PyList_SET_ITEM(sublist, 0, PyFloat_FromDouble(mat[i][0])); - PyList_SET_ITEM(sublist, 1, PyFloat_FromDouble(mat[i][1])); - PyList_SET_ITEM(sublist, 2, PyFloat_FromDouble(mat[i][2])); - PyList_SET_ITEM(list, i, sublist); + col = PyList_New(3); + PyList_SET_ITEM(col, 0, PyFloat_FromDouble(mat[0][i])); + PyList_SET_ITEM(col, 1, PyFloat_FromDouble(mat[1][i])); + PyList_SET_ITEM(col, 2, PyFloat_FromDouble(mat[2][i])); + PyList_SET_ITEM(collist, i, col); } - return list; + return collist; #endif } |