Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Matrix.c')
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index 980dbd17a96..293a960e0a6 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -1489,9 +1489,10 @@ static PyObject *Matrix_add(PyObject *m1, PyObject *m2)
mat2 = (MatrixObject*)m2;
if (!MatrixObject_Check(m1) || !MatrixObject_Check(m2)) {
- PyErr_SetString(PyExc_TypeError,
- "Matrix addition: "
- "arguments not valid for this operation");
+ PyErr_Format(PyExc_TypeError,
+ "Matrix addition: (%s + %s) "
+ "invalid type for this operation",
+ Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name);
return NULL;
}
@@ -1520,9 +1521,11 @@ static PyObject *Matrix_sub(PyObject *m1, PyObject *m2)
mat2 = (MatrixObject*)m2;
if (!MatrixObject_Check(m1) || !MatrixObject_Check(m2)) {
- PyErr_SetString(PyExc_TypeError,
- "Matrix addition: "
- "arguments not valid for this operation");
+ PyErr_Format(PyExc_TypeError,
+ "Matrix subtraction: (%s - %s) "
+ "invalid type for this operation",
+ Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name
+ );
return NULL;
}