Correct own error simplifying matrix checks

This commit is contained in:
2017-09-03 00:05:11 +10:00
parent 3750389ce3
commit 32e36a1782

View File

@@ -205,7 +205,7 @@ static int bpy_slot_from_py(
if (!Matrix_ParseAny(value, &pymat)) { if (!Matrix_ParseAny(value, &pymat)) {
return -1; return -1;
} }
if ((size = (pymat->num_col) != pymat->num_row) || (!ELEM(size, 3, 4))) { if (((size = pymat->num_col) != pymat->num_row) || (!ELEM(size, 3, 4))) {
PyErr_Format(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"%.200s: keyword \"%.200s\" expected a 3x3 or 4x4 matrix Matrix", "%.200s: keyword \"%.200s\" expected a 3x3 or 4x4 matrix Matrix",
opname, slot_name); opname, slot_name);