diff options
Diffstat (limited to 'source/blender/python/generic/IDProp.c')
-rw-r--r-- | source/blender/python/generic/IDProp.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/python/generic/IDProp.c b/source/blender/python/generic/IDProp.c index 4dfb76c6617..3ae9d83cd4f 100644 --- a/source/blender/python/generic/IDProp.c +++ b/source/blender/python/generic/IDProp.c @@ -89,7 +89,7 @@ PyObject *BPy_IDGroup_WrapData( ID *id, IDProperty *prop ) int i; if (!seq) { - PyErr_Format( PyExc_RuntimeError, "BPy_IDGroup_MapDataToPy, IDP_IDPARRAY: PyList_New(%d) failed", prop->len); + PyErr_Format(PyExc_RuntimeError, "BPy_IDGroup_MapDataToPy, IDP_IDPARRAY: PyList_New(%d) failed", prop->len); return NULL; } @@ -219,7 +219,7 @@ static PyGetSetDef BPy_IDGroup_getseters[] = { static Py_ssize_t BPy_IDGroup_Map_Len(BPy_IDProperty *self) { if (self->prop->type != IDP_GROUP) { - PyErr_SetString( PyExc_TypeError, "len() of unsized object"); + PyErr_SetString(PyExc_TypeError, "len() of unsized object"); return -1; } @@ -232,21 +232,21 @@ static PyObject *BPy_IDGroup_Map_GetItem(BPy_IDProperty *self, PyObject *item) char *name; if (self->prop->type != IDP_GROUP) { - PyErr_SetString( PyExc_TypeError, "unsubscriptable object"); + PyErr_SetString(PyExc_TypeError, "unsubscriptable object"); return NULL; } name= _PyUnicode_AsString(item); if (name == NULL) { - PyErr_SetString( PyExc_TypeError, "only strings are allowed as keys of ID properties"); + PyErr_SetString(PyExc_TypeError, "only strings are allowed as keys of ID properties"); return NULL; } idprop= IDP_GetPropertyFromGroup(self->prop, name); if(idprop==NULL) { - PyErr_SetString( PyExc_KeyError, "key not in subgroup dict"); + PyErr_SetString(PyExc_KeyError, "key not in subgroup dict"); return NULL; } @@ -415,7 +415,7 @@ const char *BPy_IDProperty_Map_ValidateAndCreate(const char *name, IDProperty *g int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val) { if (prop->type != IDP_GROUP) { - PyErr_SetString( PyExc_TypeError, "unsubscriptable object"); + PyErr_SetString(PyExc_TypeError, "unsubscriptable object"); return -1; } @@ -427,7 +427,7 @@ int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val) MEM_freeN(pkey); return 0; } else { - PyErr_SetString( PyExc_KeyError, "property not found in group" ); + PyErr_SetString(PyExc_KeyError, "property not found in group"); return -1; } } @@ -435,13 +435,13 @@ int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val) const char *err; if (!PyUnicode_Check(key)) { - PyErr_SetString( PyExc_TypeError, "only strings are allowed as subgroup keys" ); + PyErr_SetString(PyExc_TypeError, "only strings are allowed as subgroup keys"); return -1; } err = BPy_IDProperty_Map_ValidateAndCreate(_PyUnicode_AsString(key), prop, val); if (err) { - PyErr_SetString( PyExc_KeyError, err ); + PyErr_SetString(PyExc_KeyError, err ); return -1; } @@ -489,7 +489,7 @@ static PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop) int i; if (!seq) { - PyErr_Format( PyExc_RuntimeError, "BPy_IDGroup_MapDataToPy, IDP_ARRAY: PyList_New(%d) failed", prop->len); + PyErr_Format(PyExc_RuntimeError, "BPy_IDGroup_MapDataToPy, IDP_ARRAY: PyList_New(%d) failed", prop->len); return NULL; } @@ -514,7 +514,7 @@ static PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop) int i; if (!seq) { - PyErr_Format( PyExc_RuntimeError, "BPy_IDGroup_MapDataToPy, IDP_IDPARRAY: PyList_New(%d) failed", prop->len); + PyErr_Format(PyExc_RuntimeError, "BPy_IDGroup_MapDataToPy, IDP_IDPARRAY: PyList_New(%d) failed", prop->len); return NULL; } @@ -556,7 +556,7 @@ static PyObject *BPy_IDGroup_Pop(BPy_IDProperty *self, PyObject *value) char *name = _PyUnicode_AsString(value); if (!name) { - PyErr_SetString( PyExc_TypeError, "pop expected at least 1 argument, got 0" ); + PyErr_SetString(PyExc_TypeError, "pop expected at least 1 argument, got 0"); return NULL; } @@ -576,7 +576,7 @@ static PyObject *BPy_IDGroup_Pop(BPy_IDProperty *self, PyObject *value) return pyform; } - PyErr_SetString( PyExc_KeyError, "item not in group" ); + PyErr_SetString(PyExc_KeyError, "item not in group"); return NULL; } @@ -693,7 +693,7 @@ static int BPy_IDGroup_Contains(BPy_IDProperty *self, PyObject *value) char *name = _PyUnicode_AsString(value); if (!name) { - PyErr_SetString( PyExc_TypeError, "expected a string"); + PyErr_SetString(PyExc_TypeError, "expected a string"); return -1; } @@ -706,7 +706,7 @@ static PyObject *BPy_IDGroup_Update(BPy_IDProperty *self, PyObject *value) Py_ssize_t i=0; if (!PyDict_Check(value)) { - PyErr_SetString( PyExc_TypeError, "expected an object derived from dict."); + PyErr_SetString(PyExc_TypeError, "expected an object derived from dict"); return NULL; } @@ -906,7 +906,7 @@ static int BPy_IDArray_Len(BPy_IDArray *self) static PyObject *BPy_IDArray_GetItem(BPy_IDArray *self, int index) { if (index < 0 || index >= self->prop->len) { - PyErr_SetString( PyExc_IndexError, "index out of range!"); + PyErr_SetString(PyExc_IndexError, "index out of range!"); return NULL; } @@ -922,7 +922,7 @@ static PyObject *BPy_IDArray_GetItem(BPy_IDArray *self, int index) break; } - PyErr_SetString( PyExc_RuntimeError, "invalid/corrupt array type!"); + PyErr_SetString(PyExc_RuntimeError, "invalid/corrupt array type!"); return NULL; } @@ -933,7 +933,7 @@ static int BPy_IDArray_SetItem(BPy_IDArray *self, int index, PyObject *value) double d; if (index < 0 || index >= self->prop->len) { - PyErr_SetString( PyExc_RuntimeError, "index out of range!"); + PyErr_SetString(PyExc_RuntimeError, "index out of range!"); return -1; } @@ -1092,7 +1092,7 @@ static PyObject *BPy_Group_Iter_Next(BPy_IDGroup_Iter *self) return PyUnicode_FromString(cur->name); } } else { - PyErr_SetString( PyExc_StopIteration, "iterator at end" ); + PyErr_SetString(PyExc_StopIteration, "iterator at end"); return NULL; } } |