Python API
Mathutils support for subclassing Vector, Quat, Euler and Matrix types. Removed C docstrings, prefer to make sure our epydocs are well maintained rather then duplicate, vague doc strings. Will convert scripts to detect missing docs from the BGE.
This commit is contained in:
@@ -99,7 +99,7 @@ PyObject* PyObjectFrom(const MT_Matrix4x4 &mat)
|
||||
#ifdef USE_MATHUTILS
|
||||
float fmat[16];
|
||||
mat.getValue(fmat);
|
||||
return newMatrixObject(fmat, 4, 4, Py_NEW);
|
||||
return newMatrixObject(fmat, 4, 4, Py_NEW, NULL);
|
||||
#else
|
||||
PyObject *list = PyList_New(4);
|
||||
PyObject *sublist;
|
||||
@@ -123,7 +123,7 @@ PyObject* PyObjectFrom(const MT_Matrix3x3 &mat)
|
||||
#ifdef USE_MATHUTILS
|
||||
float fmat[9];
|
||||
mat.getValue3x3(fmat);
|
||||
return newMatrixObject(fmat, 3, 3, Py_NEW);
|
||||
return newMatrixObject(fmat, 3, 3, Py_NEW, NULL);
|
||||
#else
|
||||
PyObject *list = PyList_New(3);
|
||||
PyObject *sublist;
|
||||
@@ -146,7 +146,7 @@ PyObject* PyObjectFrom(const MT_Quaternion &qrot)
|
||||
{
|
||||
/* NOTE, were re-ordering here for Mathutils compat */
|
||||
float fvec[4]= {qrot[3], qrot[0], qrot[1], qrot[2]};
|
||||
return newQuaternionObject(fvec, Py_WRAP);
|
||||
return newQuaternionObject(fvec, Py_WRAP, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -154,7 +154,7 @@ PyObject* PyObjectFrom(const MT_Tuple4 &vec)
|
||||
{
|
||||
#ifdef USE_MATHUTILS
|
||||
float fvec[4]= {vec[0], vec[1], vec[2], vec[3]};
|
||||
return newVectorObject(fvec, 4, Py_WRAP);
|
||||
return newVectorObject(fvec, 4, Py_WRAP, NULL);
|
||||
#else
|
||||
PyObject *list = PyList_New(4);
|
||||
PyList_SET_ITEM(list, 0, PyFloat_FromDouble(vec[0]));
|
||||
@@ -169,7 +169,7 @@ PyObject* PyObjectFrom(const MT_Tuple3 &vec)
|
||||
{
|
||||
#ifdef USE_MATHUTILS
|
||||
float fvec[3]= {vec[0], vec[1], vec[2]};
|
||||
return newVectorObject(fvec, 3, Py_WRAP);
|
||||
return newVectorObject(fvec, 3, Py_WRAP, NULL);
|
||||
#else
|
||||
PyObject *list = PyList_New(3);
|
||||
PyList_SET_ITEM(list, 0, PyFloat_FromDouble(vec[0]));
|
||||
@@ -183,7 +183,7 @@ PyObject* PyObjectFrom(const MT_Tuple2 &vec)
|
||||
{
|
||||
#ifdef USE_MATHUTILS
|
||||
float fvec[2]= {vec[0], vec[1]};
|
||||
return newVectorObject(fvec, 2, Py_WRAP);
|
||||
return newVectorObject(fvec, 2, Py_WRAP, NULL);
|
||||
#else
|
||||
PyObject *list = PyList_New(2);
|
||||
PyList_SET_ITEM(list, 0, PyFloat_FromDouble(vec[0]));
|
||||
|
||||
Reference in New Issue
Block a user