Fix T38402: invalid message for bad type assignments (Quat, Vector)
This commit is contained in:
@@ -550,7 +550,7 @@ static int bpy_bmdeformvert_ass_subscript(BPy_BMDeformVert *self, PyObject *key,
|
|||||||
if (f == -1 && PyErr_Occurred()) { // parsed key not a number
|
if (f == -1 && PyErr_Occurred()) { // parsed key not a number
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"BMDeformVert[key] = x: "
|
"BMDeformVert[key] = x: "
|
||||||
"argument not a number");
|
"assigned value not a number");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ static int Color_ass_item(ColorObject *self, int i, PyObject *value)
|
|||||||
if (f == -1 && PyErr_Occurred()) { /* parsed item not a number */
|
if (f == -1 && PyErr_Occurred()) { /* parsed item not a number */
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"color[item] = x: "
|
"color[item] = x: "
|
||||||
"argument not a number");
|
"assigned value not a number");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -722,7 +722,7 @@ static int Color_channel_hsv_set(ColorObject *self, PyObject *value, void *type)
|
|||||||
if (f == -1 && PyErr_Occurred()) {
|
if (f == -1 && PyErr_Occurred()) {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"color.h/s/v = value: "
|
"color.h/s/v = value: "
|
||||||
"argument not a number");
|
"assigned value not a number");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ static int Euler_ass_item(EulerObject *self, int i, PyObject *value)
|
|||||||
if (f == -1 && PyErr_Occurred()) { /* parsed item not a number */
|
if (f == -1 && PyErr_Occurred()) { /* parsed item not a number */
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"euler[attribute] = x: "
|
"euler[attribute] = x: "
|
||||||
"argument not a number");
|
"assigned value not a number");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -583,7 +583,7 @@ static int Quaternion_ass_item(QuaternionObject *self, int i, PyObject *ob)
|
|||||||
if (scalar == -1.0f && PyErr_Occurred()) { /* parsed item not a number */
|
if (scalar == -1.0f && PyErr_Occurred()) { /* parsed item not a number */
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"quaternion[index] = x: "
|
"quaternion[index] = x: "
|
||||||
"index argument not a number");
|
"assigned value not a number");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1295,7 +1295,7 @@ static int vector_ass_item_internal(VectorObject *self, int i, PyObject *value,
|
|||||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) { /* parsed item not a number */
|
if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) { /* parsed item not a number */
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"vector[index] = x: "
|
"vector[index] = x: "
|
||||||
"index argument not a number");
|
"assigned value not a number");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user