Fix T38402: invalid message for bad type assignments (Quat, Vector)
This commit is contained in:
parent
6e479b18ef
commit
bd697dd4d7
Notes:
blender-bot
2023-02-14 20:10:55 +01:00
Referenced by issue blender/blender-addons#38402, mathutils.Vector - incorrect error message for bad type assignments
|
@ -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
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"BMDeformVert[key] = x: "
|
||||
"argument not a number");
|
||||
"assigned value not a number");
|
||||
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 */
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"color[item] = x: "
|
||||
"argument not a number");
|
||||
"assigned value not a number");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -722,7 +722,7 @@ static int Color_channel_hsv_set(ColorObject *self, PyObject *value, void *type)
|
|||
if (f == -1 && PyErr_Occurred()) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"color.h/s/v = value: "
|
||||
"argument not a number");
|
||||
"assigned value not a number");
|
||||
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 */
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"euler[attribute] = x: "
|
||||
"argument not a number");
|
||||
"assigned value not a number");
|
||||
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 */
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"quaternion[index] = x: "
|
||||
"index argument not a number");
|
||||
"assigned value not a number");
|
||||
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 */
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"vector[index] = x: "
|
||||
"index argument not a number");
|
||||
"assigned value not a number");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue