Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-05-20 23:49:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-20 23:49:27 +0400
commit2d2d36fe3b2f3e7eed7d05714abc80f1a5a82303 (patch)
tree7ad54825db128e59312fbf787555fd91edf09a07 /source/blender/python
parent5d9256404159670bec6d65557697accb5b3111b8 (diff)
code cleanup:
- style - multi-line ifs move braces onto new lines. - iterators - convert some to macros, other split up and move brace.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c2
-rw-r--r--source/blender/python/generic/idprop_py_api.c4
-rw-r--r--source/blender/python/intern/bpy_library.c6
-rw-r--r--source/blender/python/intern/bpy_operator.c2
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c3
5 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index 942e0fce2f7..1c0040aec89 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -3184,7 +3184,7 @@ void *BPy_BMElem_PySeq_As_Array(BMesh **r_bm, PyObject *seq, Py_ssize_t min, Py_
}
/* trick so we can ensure all items have the same mesh,
* and allows us to pass the 'bm' as NULL. */
- else if (do_bm_check && (bm && bm != item->bm)) {
+ else if (do_bm_check && (bm && bm != item->bm)) {
PyErr_Format(PyExc_ValueError,
"%s: %d %s is from another mesh",
error_prefix, i, BPy_BMElem_StringFromHType(htype));
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index 9fd120b11aa..15eeb5934d8 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -277,7 +277,7 @@ static PyObject *BPy_IDGroup_Map_GetItem(BPy_IDProperty *self, PyObject *item)
IDProperty *idprop;
const char *name;
- if (self->prop->type != IDP_GROUP) {
+ if (self->prop->type != IDP_GROUP) {
PyErr_SetString(PyExc_TypeError, "unsubscriptable object");
return NULL;
}
@@ -483,7 +483,7 @@ const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty
int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val)
{
- if (prop->type != IDP_GROUP) {
+ if (prop->type != IDP_GROUP) {
PyErr_SetString(PyExc_TypeError, "unsubscriptable object");
return -1;
}
diff --git a/source/blender/python/intern/bpy_library.c b/source/blender/python/intern/bpy_library.c
index a5350b984c1..1d02acbe983 100644
--- a/source/blender/python/intern/bpy_library.c
+++ b/source/blender/python/intern/bpy_library.c
@@ -291,7 +291,8 @@ static void bpy_lib_exit_warn_idname(BPy_Library *self, const char *name_plural,
PyErr_Fetch(&exc, &val, &tb);
if (PyErr_WarnFormat(PyExc_UserWarning, 1,
"load: '%s' does not contain %s[\"%s\"]",
- self->abspath, name_plural, idname)) {
+ self->abspath, name_plural, idname))
+ {
/* Spurious errors can appear at shutdown */
if (PyErr_ExceptionMatches(PyExc_Warning)) {
PyErr_WriteUnraisable((PyObject *)self);
@@ -306,7 +307,8 @@ static void bpy_lib_exit_warn_type(BPy_Library *self, PyObject *item)
PyErr_Fetch(&exc, &val, &tb);
if (PyErr_WarnFormat(PyExc_UserWarning, 1,
"load: '%s' expected a string type, not a %.200s",
- self->abspath, Py_TYPE(item)->tp_name)) {
+ self->abspath, Py_TYPE(item)->tp_name))
+ {
/* Spurious errors can appear at shutdown */
if (PyErr_ExceptionMatches(PyExc_Warning)) {
PyErr_WriteUnraisable((PyObject *)self);
diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c
index 8f5a9fec86b..10562271941 100644
--- a/source/blender/python/intern/bpy_operator.c
+++ b/source/blender/python/intern/bpy_operator.c
@@ -389,7 +389,7 @@ static PyObject *pyop_getrna(PyObject *UNUSED(self), PyObject *value)
return NULL;
}
ot = WM_operatortype_find(opname, TRUE);
- if (ot == NULL) {
+ if (ot == NULL) {
PyErr_Format(PyExc_KeyError, "_bpy.ops.get_rna(\"%s\") not found", opname);
return NULL;
}
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index d1da4660f3b..5ac1214409f 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -196,7 +196,8 @@ static PyObject *Quaternion_cross(QuaternionObject *self, PyObject *value)
return NULL;
if (mathutils_array_parse(tquat, QUAT_SIZE, QUAT_SIZE, value,
- "Quaternion.cross(other), invalid 'other' arg") == -1) {
+ "Quaternion.cross(other), invalid 'other' arg") == -1)
+ {
return NULL;
}