[Bf-blender-cvs] [bd697dd] master: Fix T38402: invalid message for bad type assignments (Quat, Vector)

Campbell Barton noreply at git.blender.org
Thu Jan 30 06:46:09 CET 2014


Commit: bd697dd4d7e3b753aa18a1767e20c80d52f65aa4
Author: Campbell Barton
Date:   Thu Jan 30 16:45:20 2014 +1100
https://developer.blender.org/rBbd697dd4d7e3b753aa18a1767e20c80d52f65aa4

Fix T38402: invalid message for bad type assignments (Quat, Vector)

===================================================================

M	source/blender/python/bmesh/bmesh_py_types_meshdata.c
M	source/blender/python/mathutils/mathutils_Color.c
M	source/blender/python/mathutils/mathutils_Euler.c
M	source/blender/python/mathutils/mathutils_Quaternion.c
M	source/blender/python/mathutils/mathutils_Vector.c

===================================================================

diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index e9ee53c..7edbf72 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -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;
 				}
 
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c
index 9c3edec..aee2b9e 100644
--- a/source/blender/python/mathutils/mathutils_Color.c
+++ b/source/blender/python/mathutils/mathutils_Color.c
@@ -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;
 	}
 
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index 2a874f5..5d8252d 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -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;
 	}
 
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index e131360..75fe05a 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -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;
 	}
 
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index 0e68640..68a070e 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -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;
 	}




More information about the Bf-blender-cvs mailing list