diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-30 20:22:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-30 20:22:40 +0400 |
commit | a5af5e8f50b740720609342671347ae229422212 (patch) | |
tree | 540dcff42cf737f5d8cbf093427171ba837f974f /source/blender/python | |
parent | f111131ca68359e928056eff09a03d0eee8c681a (diff) |
style cleanup: re - http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 7c8f28d0979..12f0d45396d 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -1424,7 +1424,8 @@ int pyrna_pydict_to_props(PointerRNA *ptr, PyObject *kw, int all_args, const cha totkw = kw ? PyDict_Size(kw) : 0; - RNA_STRUCT_BEGIN (ptr, prop) { + RNA_STRUCT_BEGIN (ptr, prop) + { arg_name = RNA_property_identifier(prop); if (strcmp(arg_name, "rna_type") == 0) continue; @@ -2203,7 +2204,8 @@ int pyrna_prop_collection_subscript_str_lib_pair_ptr(BPy_PropertyRNA *self, PyOb /* lib is either a valid poniter or NULL, * either way can do direct comparison with id.lib */ - RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) { + RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) + { ID *id = itemptr.data; /* always an ID */ if (id->lib == lib && (strncmp(keyname, id->name + 2, sizeof(id->name) - 2) == 0)) { found = TRUE; @@ -3346,7 +3348,8 @@ static void pyrna_dir_members_rna(PyObject *list, PointerRNA *ptr) RNA_pointer_create(NULL, &RNA_Struct, ptr->type, &tptr); iterprop = RNA_struct_find_property(&tptr, "functions"); - RNA_PROP_BEGIN (&tptr, itemptr, iterprop) { + RNA_PROP_BEGIN (&tptr, itemptr, iterprop) + { idname = RNA_function_identifier(itemptr.data); pystring = PyUnicode_FromString(idname); @@ -3365,7 +3368,8 @@ static void pyrna_dir_members_rna(PyObject *list, PointerRNA *ptr) iterprop = RNA_struct_iterator_property(ptr->type); - RNA_PROP_BEGIN (ptr, itemptr, iterprop) { + RNA_PROP_BEGIN (ptr, itemptr, iterprop) + { nameptr = RNA_struct_name_get_alloc(&itemptr, name, sizeof(name), &namelen); if (nameptr) { @@ -3980,7 +3984,8 @@ static PyObject *pyrna_prop_collection_keys(BPy_PropertyRNA *self) char name[256], *nameptr; int namelen; - RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) { + RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) + { nameptr = RNA_struct_name_get_alloc(&itemptr, name, sizeof(name), &namelen); if (nameptr) { @@ -4017,7 +4022,8 @@ static PyObject *pyrna_prop_collection_items(BPy_PropertyRNA *self) int namelen; int i = 0; - RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) { + RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) + { if (itemptr.data) { /* add to python list */ item = PyTuple_New(2); @@ -4189,7 +4195,8 @@ static PyObject *pyrna_prop_collection_find(BPy_PropertyRNA *self, PyObject *key PYRNA_PROP_CHECK_OBJ(self); - RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) { + RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) + { nameptr = RNA_struct_name_get_alloc(&itemptr, name, sizeof(name), &namelen); if (nameptr) { @@ -4220,7 +4227,8 @@ static void foreach_attr_type(BPy_PropertyRNA *self, const char *attr, *attr_signed = FALSE; /* note: this is fail with zero length lists, so don't let this get caled in that case */ - RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) { + RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) + { prop = RNA_struct_find_property(&itemptr, attr); *raw_type = RNA_property_raw_type(prop); *attr_tot = RNA_property_array_length(&itemptr, prop); @@ -6401,7 +6409,8 @@ static PyObject *pyrna_basetype_dir(BPy_BaseTypeRNA *self) PyObject *ret = PyList_New(0); PyObject *item; - RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) { + RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) + { StructRNA *srna = itemptr.data; StructRNA *srna_base = RNA_struct_base(itemptr.data); /* skip own operators, these double up [#29666] */ @@ -7189,7 +7198,8 @@ void pyrna_alloc_types(void) RNA_blender_rna_pointer_create(&ptr); prop = RNA_struct_find_property(&ptr, "structs"); - RNA_PROP_BEGIN (&ptr, itemptr, prop) { + RNA_PROP_BEGIN (&ptr, itemptr, prop) + { PyObject *item = pyrna_struct_Subtype(&itemptr); if (item == NULL) { if (PyErr_Occurred()) { @@ -7217,7 +7227,8 @@ void pyrna_free_types(void) prop = RNA_struct_find_property(&ptr, "structs"); - RNA_PROP_BEGIN (&ptr, itemptr, prop) { + RNA_PROP_BEGIN (&ptr, itemptr, prop) + { StructRNA *srna = srna_from_ptr(&itemptr); void *py_ptr = RNA_struct_py_type_get(srna); @@ -7475,9 +7486,9 @@ static PyObject *pyrna_unregister_class(PyObject *UNUSED(self), PyObject *py_cla prop_rna = RNA_struct_find_property(&ptr_rna, "structs"); - /* loop over all structs */ - RNA_PROP_BEGIN (&ptr_rna, itemptr, prop_rna) { + RNA_PROP_BEGIN (&ptr_rna, itemptr, prop_rna) + { srna_iter = itemptr.data; if (pyrna_srna_contains_pointer_prop_srna(srna_iter, srna, &prop_identifier)) { break; |