From 7f1e9b8c4116915d1a7073f712f62f234454c323 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Mar 2012 10:30:10 +0000 Subject: bmesh py api: added access to deform weights, access to weights acts like a python dict so you can do... print(group in dvert) dvert[group] = 0.5 print(dvert[group]) del dvert[group] print(dvert.items()) --- source/blender/python/mathutils/mathutils_Color.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/python/mathutils') diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c index 5fe3ea4c187..3b60d6655d6 100644 --- a/source/blender/python/mathutils/mathutils_Color.c +++ b/source/blender/python/mathutils/mathutils_Color.c @@ -194,7 +194,7 @@ static PyObject *Color_item(ColorObject *self, int i) if (i < 0 || i >= COLOR_SIZE) { PyErr_SetString(PyExc_IndexError, - "color[attribute]: " + "color[item]: " "array index out of range"); return NULL; } @@ -213,7 +213,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[attribute] = x: " + "color[item] = x: " "argument not a number"); return -1; } @@ -221,7 +221,7 @@ static int Color_ass_item(ColorObject *self, int i, PyObject *value) if (i < 0) i = COLOR_SIZE - i; if (i < 0 || i >= COLOR_SIZE) { - PyErr_SetString(PyExc_IndexError, "color[attribute] = x: " + PyErr_SetString(PyExc_IndexError, "color[item] = x: " "array assignment index out of range"); return -1; } -- cgit v1.2.3