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-03-24 10:24:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-24 10:24:53 +0400
commit5a90ea77bc1333efe4e1e54984a080550ed3f707 (patch)
tree8ba5f94ddcd2c57440197a910305daae5e913554 /source/blender/makesrna
parent69e6894b15271884623ea6f56ead06db83acbe99 (diff)
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/makesrna.c44
-rw-r--r--source/blender/makesrna/intern/rna_access.c7
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c17
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c12
-rw-r--r--source/blender/makesrna/intern/rna_curve.c15
-rw-r--r--source/blender/makesrna/intern/rna_define.c9
-rw-r--r--source/blender/makesrna/intern/rna_image.c2
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c3
-rw-r--r--source/blender/makesrna/intern/rna_object.c21
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c3
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c6
-rw-r--r--source/blender/makesrna/intern/rna_property.c2
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c3
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c12
-rw-r--r--source/blender/makesrna/intern/rna_space.c6
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c2
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c3
17 files changed, 101 insertions, 66 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 4c5fc709d7e..473934c3b44 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -607,12 +607,12 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
"get_length");
fprintf(f, " int i, arraylen[RNA_MAX_ARRAY_DIMENSION];\n");
fprintf(f, " int len= %s(ptr, arraylen);\n\n", lenfunc);
- fprintf(f, " for(i=0; i<len; i++) {\n");
+ fprintf(f, " for (i=0; i<len; i++) {\n");
MEM_freeN(lenfunc);
}
else {
fprintf(f, " int i;\n\n");
- fprintf(f, " for(i=0; i<%u; i++) {\n", prop->totarraylength);
+ fprintf(f, " for (i=0; i<%u; i++) {\n", prop->totarraylength);
}
if (dp->dnaarraylength == 1) {
@@ -801,20 +801,20 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
if (prop->flag & PROP_ID_SELF_CHECK) {
rna_print_id_get(f, dp);
- fprintf(f, " if(id==value.data) return;\n\n");
+ fprintf(f, " if (id==value.data) return;\n\n");
}
if (prop->flag & PROP_ID_REFCOUNT) {
- fprintf(f, "\n if(data->%s)\n", dp->dnaname);
+ fprintf(f, "\n if (data->%s)\n", dp->dnaname);
fprintf(f, " id_us_min((ID*)data->%s);\n", dp->dnaname);
- fprintf(f, " if(value.data)\n");
+ fprintf(f, " if (value.data)\n");
fprintf(f, " id_us_plus((ID*)value.data);\n\n");
}
else {
PointerPropertyRNA *pprop = (PointerPropertyRNA*)dp->prop;
StructRNA *type = rna_find_struct((const char*)pprop->type);
if (type && (type->flag & STRUCT_ID)) {
- fprintf(f, " if(value.data)\n");
+ fprintf(f, " if (value.data)\n");
fprintf(f, " id_lib_extern((ID*)value.data);\n\n");
}
}
@@ -846,18 +846,18 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, " int i, arraylen[RNA_MAX_ARRAY_DIMENSION];\n");
fprintf(f, " int len= %s(ptr, arraylen);\n\n", lenfunc);
rna_clamp_value_range(f, prop);
- fprintf(f, " for(i=0; i<len; i++) {\n");
+ fprintf(f, " for (i=0; i<len; i++) {\n");
MEM_freeN(lenfunc);
}
else {
fprintf(f, " int i;\n\n");
rna_clamp_value_range(f, prop);
- fprintf(f, " for(i=0; i<%u; i++) {\n", prop->totarraylength);
+ fprintf(f, " for (i=0; i<%u; i++) {\n", prop->totarraylength);
}
if (dp->dnaarraylength == 1) {
if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
- fprintf(f, " if(%svalues[i]) data->%s |= (%d<<i);\n",
+ fprintf(f, " if (%svalues[i]) data->%s |= (%d<<i);\n",
(dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
fprintf(f, " else data->%s &= ~(%d<<i);\n", dp->dnaname, dp->booleanbit);
}
@@ -868,7 +868,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
}
else {
if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
- fprintf(f, " if(%svalues[i]) data->%s[i] |= ", (dp->booleannegative) ? "!" : "",
+ fprintf(f, " if (%svalues[i]) data->%s[i] |= ", (dp->booleannegative) ? "!" : "",
dp->dnaname);
rna_int_print(f, dp->booleanbit);
fprintf(f, ";\n");
@@ -902,7 +902,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
else {
rna_print_data_get(f, dp);
if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
- fprintf(f, " if(%svalue) data->%s |= ", (dp->booleannegative) ? "!" : "", dp->dnaname);
+ fprintf(f, " if (%svalue) data->%s |= ", (dp->booleannegative) ? "!" : "", dp->dnaname);
rna_int_print(f, dp->booleanbit);
fprintf(f, ";\n");
fprintf(f, " else data->%s &= ~", dp->dnaname);
@@ -1043,7 +1043,7 @@ static char *rna_def_property_begin_func(FILE *f, StructRNA *srna, PropertyRNA *
getfunc = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get");
- fprintf(f, "\n if(iter->valid)\n");
+ fprintf(f, "\n if (iter->valid)\n");
fprintf(f, " iter->ptr= %s(iter);\n", getfunc);
fprintf(f, "}\n\n");
@@ -1087,19 +1087,19 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
fprintf(f, " CollectionPropertyIterator iter;\n\n");
fprintf(f, " %s_%s_begin(&iter, ptr);\n\n", srna->identifier, rna_safe_id(prop->identifier));
- fprintf(f, " if(iter.valid){\n");
+ fprintf(f, " if (iter.valid) {\n");
if (strcmp(nextfunc, "rna_iterator_array_next") == 0) {
fprintf(f, " ArrayIterator *internal= iter.internal;\n");
- fprintf(f, " if(index < 0 || index >= internal->length) {\n");
+ fprintf(f, " if (index < 0 || index >= internal->length) {\n");
fprintf(f, "#ifdef __GNUC__\n");
fprintf(f, " printf(\"Array iterator out of range: %%s (index %%d)\\n\", __func__, index);\n");
fprintf(f, "#else\n");
fprintf(f, " printf(\"Array iterator out of range: (index %%d)\\n\", index);\n");
fprintf(f, "#endif\n");
fprintf(f, " }\n");
- fprintf(f, " else if(internal->skip) {\n");
- fprintf(f, " while(index-- > 0 && iter.valid) {\n");
+ fprintf(f, " else if (internal->skip) {\n");
+ fprintf(f, " while (index-- > 0 && iter.valid) {\n");
fprintf(f, " rna_iterator_array_next(&iter);\n");
fprintf(f, " }\n");
fprintf(f, " found= (index == -1 && iter.valid);\n");
@@ -1111,20 +1111,20 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
}
else if (strcmp(nextfunc, "rna_iterator_listbase_next") == 0) {
fprintf(f, " ListBaseIterator *internal= iter.internal;\n");
- fprintf(f, " if(internal->skip) {\n");
- fprintf(f, " while(index-- > 0 && iter.valid) {\n");
+ fprintf(f, " if (internal->skip) {\n");
+ fprintf(f, " while (index-- > 0 && iter.valid) {\n");
fprintf(f, " rna_iterator_listbase_next(&iter);\n");
fprintf(f, " }\n");
fprintf(f, " found= (index == -1 && iter.valid);\n");
fprintf(f, " }\n");
fprintf(f, " else {\n");
- fprintf(f, " while(index-- > 0 && internal->link)\n");
+ fprintf(f, " while (index-- > 0 && internal->link)\n");
fprintf(f, " internal->link= internal->link->next;\n");
fprintf(f, " found= (index == -1 && internal->link);\n");
fprintf(f, " }\n");
}
- fprintf(f, " if(found) *r_ptr = %s_%s_get(&iter);\n", srna->identifier, rna_safe_id(prop->identifier));
+ fprintf(f, " if (found) *r_ptr = %s_%s_get(&iter);\n", srna->identifier, rna_safe_id(prop->identifier));
fprintf(f, " }\n\n");
fprintf(f, " %s_%s_end(&iter);\n\n", srna->identifier, rna_safe_id(prop->identifier));
@@ -1175,7 +1175,7 @@ static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *p
getfunc = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get");
- fprintf(f, "\n if(iter->valid)\n");
+ fprintf(f, "\n if (iter->valid)\n");
fprintf(f, " iter->ptr= %s(iter);\n", getfunc);
fprintf(f, "}\n\n");
@@ -2754,7 +2754,7 @@ static void rna_generate_header(BlenderRNA *brna, FILE *f)
fprintf(f, "#define FOREACH_BEGIN(property, sptr, itemptr) \\\n");
fprintf(f, " { \\\n");
fprintf(f, " CollectionPropertyIterator rna_macro_iter; \\\n");
- fprintf(f, " for(property##_begin(&rna_macro_iter, sptr); rna_macro_iter.valid; "
+ fprintf(f, " for (property##_begin(&rna_macro_iter, sptr); rna_macro_iter.valid; "
"property##_next(&rna_macro_iter)) { \\\n");
fprintf(f, " itemptr= rna_macro_iter.ptr;\n\n");
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index f2a37dec5d5..d2537f9fabd 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1179,7 +1179,8 @@ void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA
if (*free) {
nitem = *item;
- } else {
+ }
+ else {
int totitem = 0;
/* count */
@@ -2721,7 +2722,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
/* py api calls directly */
#if 0
- else if (cprop->add){
+ else if (cprop->add) {
if (!(cprop->add->flag & FUNC_USE_CONTEXT)) { /* XXX check for this somewhere else */
ParameterList params;
RNA_parameter_list_create(&params, ptr, cprop->add);
@@ -2778,7 +2779,7 @@ int RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
/* py api calls directly */
#if 0
- else if (cprop->remove){
+ else if (cprop->remove) {
if (!(cprop->remove->flag & FUNC_USE_CONTEXT)) { /* XXX check for this somewhere else */
ParameterList params;
RNA_parameter_list_create(&params, ptr, cprop->remove);
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 708d3ad0699..c24b78a155c 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -341,11 +341,13 @@ static void rna_ActionActuator_add_set(struct PointerRNA *ptr, int value)
bActuator *act = (bActuator *)ptr->data;
bActionActuator *aa = act->data;
- if (value == 1){
+ if (value == 1) {
aa->flag &= ~ACT_IPOFORCE;
aa->flag |= ACT_IPOADD;
- }else
+ }
+ else {
aa->flag &= ~ACT_IPOADD;
+ }
}
static void rna_ActionActuator_force_set(struct PointerRNA *ptr, int value)
@@ -353,11 +355,13 @@ static void rna_ActionActuator_force_set(struct PointerRNA *ptr, int value)
bActuator *act = (bActuator *)ptr->data;
bActionActuator *aa = act->data;
- if (value == 1){
+ if (value == 1) {
aa->flag &= ~ACT_IPOADD;
aa->flag |= ACT_IPOFORCE;
- }else
+ }
+ else {
aa->flag &= ~ACT_IPOFORCE;
+ }
}
static void rna_ObjectActuator_type_set(struct PointerRNA *ptr, int value)
@@ -422,9 +426,10 @@ EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, Property
Object *ob = NULL;
int totitem = 0;
- if (ptr->type == &RNA_Actuator || RNA_struct_is_a(ptr->type, &RNA_Actuator)){
+ if (ptr->type == &RNA_Actuator || RNA_struct_is_a(ptr->type, &RNA_Actuator)) {
ob = (Object *)ptr->id.data;
- } else {
+ }
+ else {
/* can't use ob from ptr->id.data because that enum is also used by operators */
ob = CTX_data_active_object(C);
}
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 6c067bba4e7..8c219e94407 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -316,7 +316,8 @@ static void rna_ActionConstraint_minmax_range(PointerRNA *ptr, float *min, float
if (ELEM3(acon->type, 0, 1, 2)) {
*min = -180.0f;
*max = 180.0f;
- } else {
+ }
+ else {
*min = -1000.f;
*max = 1000.f;
}
@@ -374,7 +375,8 @@ static void rna_Constraint_followTrack_camera_set(PointerRNA *ptr, PointerRNA va
if (ob->type == OB_CAMERA && ob != (Object*)ptr->id.data) {
data->camera = ob;
}
- } else {
+ }
+ else {
data->camera = NULL;
}
}
@@ -389,7 +391,8 @@ static void rna_Constraint_followTrack_depthObject_set(PointerRNA *ptr, PointerR
if (ob->type == OB_MESH && ob != (Object*)ptr->id.data) {
data->depth_ob = ob;
}
- } else {
+ }
+ else {
data->depth_ob = NULL;
}
}
@@ -417,7 +420,8 @@ static void rna_Constraint_objectSolver_camera_set(PointerRNA *ptr, PointerRNA v
if (ob->type == OB_CAMERA && ob != (Object*)ptr->id.data) {
data->camera = ob;
}
- } else {
+ }
+ else {
data->camera = NULL;
}
}
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index bb6d5ba93ab..94ef3018812 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -353,7 +353,8 @@ static void rna_Curve_bevelObject_set(PointerRNA *ptr, PointerRNA value)
if (ob->type == OB_CURVE && ob->data != cu) {
cu->bevobj = ob;
}
- } else {
+ }
+ else {
cu->bevobj = NULL;
}
}
@@ -394,7 +395,8 @@ static void rna_Curve_taperObject_set(PointerRNA *ptr, PointerRNA value)
if (ob->type == OB_CURVE && ob->data != cu) {
cu->taperobj = ob;
}
- } else {
+ }
+ else {
cu->taperobj = NULL;
}
}
@@ -480,7 +482,8 @@ static void rna_Nurb_update_cyclic_u(Main *bmain, Scene *scene, PointerRNA *ptr)
if (nu->type == CU_BEZIER) {
calchandlesNurb(nu);
- } else {
+ }
+ else {
nurbs_knot_calc_u(nu);
}
@@ -523,7 +526,8 @@ static void rna_Curve_spline_points_add(ID *id, Nurb *nu, ReportList *reports, i
}
else if (number == 0) {
/* do nothing */
- } else {
+ }
+ else {
addNurbPoints(nu, number);
@@ -541,7 +545,8 @@ static void rna_Curve_spline_bezpoints_add(ID *id, Nurb *nu, ReportList *reports
}
else if (number == 0) {
/* do nothing */
- } else {
+ }
+ else {
addNurbPointsBezier(nu, number);
/* update */
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 5d68bcbd4d7..651b6fd9c16 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -508,8 +508,8 @@ void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
PropertyRNA *parm, *nextparm;
/*
- if(srna->flag & STRUCT_RUNTIME) {
- if(RNA_struct_py_type_get(srna)) {
+ if (srna->flag & STRUCT_RUNTIME) {
+ if (RNA_struct_py_type_get(srna)) {
fprintf(stderr, "%s '%s' freed while holding a python reference\n", __func__, srna->identifier);
}
} */
@@ -2717,7 +2717,8 @@ int rna_parameter_size(PropertyRNA *parm)
if (parm->flag & PROP_THICK_WRAP) {
StringPropertyRNA *sparm = (StringPropertyRNA*)parm;
return sizeof(char) * sparm->maxlength;
- } else
+ }
+ else
return sizeof(char *);
case PROP_POINTER: {
#ifdef RNA_RUNTIME
@@ -2762,7 +2763,7 @@ void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropert
if (tot == 0) {
*items = MEM_callocN(sizeof(EnumPropertyItem)*8, "RNA_enum_items_add");
}
- else if (tot >= 8 && (tot&(tot-1)) == 0){
+ else if (tot >= 8 && (tot&(tot-1)) == 0) {
/* power of two > 8 */
newitems = MEM_callocN(sizeof(EnumPropertyItem)*tot*2, "RNA_enum_items_add");
memcpy(newitems, *items, sizeof(EnumPropertyItem)*tot);
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index f8b2b07aa18..e5a0f43baf3 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -191,7 +191,7 @@ static void rna_Image_file_format_set(PointerRNA *ptr, int value)
/*
ibuf= BKE_image_get_ibuf(image, NULL);
- if(ibuf)
+ if (ibuf)
ibuf->ftype= ftype;
*/
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index f950729a0f0..1b50db36a3d 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -94,7 +94,8 @@ static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports
}
BKE_image_release_ibuf(image, lock);
- } else {
+ }
+ else {
BKE_reportf(reports, RPT_ERROR, "Scene not in context, couldn't get save parameters");
}
}
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 0e7df0df8ad..e3cf9af6c39 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -869,20 +869,27 @@ static int rna_GameObjectSettings_physics_type_get(PointerRNA *ptr)
if (!(ob->gameflag & OB_COLLISION)) {
if (ob->gameflag & OB_OCCLUDER) {
ob->body_type = OB_BODY_TYPE_OCCLUDER;
- } else if (ob->gameflag & OB_NAVMESH){
+ }
+ else if (ob->gameflag & OB_NAVMESH) {
ob->body_type = OB_BODY_TYPE_NAVMESH;
- } else {
+ }
+ else {
ob->body_type = OB_BODY_TYPE_NO_COLLISION;
}
- } else if (ob->gameflag & OB_SENSOR) {
+ }
+ else if (ob->gameflag & OB_SENSOR) {
ob->body_type = OB_BODY_TYPE_SENSOR;
- } else if (!(ob->gameflag & OB_DYNAMIC)) {
+ }
+ else if (!(ob->gameflag & OB_DYNAMIC)) {
ob->body_type = OB_BODY_TYPE_STATIC;
- } else if (!(ob->gameflag & (OB_RIGID_BODY|OB_SOFT_BODY))) {
+ }
+ else if (!(ob->gameflag & (OB_RIGID_BODY|OB_SOFT_BODY))) {
ob->body_type = OB_BODY_TYPE_DYNAMIC;
- } else if (ob->gameflag & OB_RIGID_BODY) {
+ }
+ else if (ob->gameflag & OB_RIGID_BODY) {
ob->body_type = OB_BODY_TYPE_RIGID;
- } else {
+ }
+ else {
ob->body_type = OB_BODY_TYPE_SOFT;
/* create the structure here because we display soft body buttons in the main panel */
if (!ob->bsoft)
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 69b948e17a1..0e97729c52c 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -155,7 +155,8 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
/* copies the data */
tmpmesh = copy_mesh( ob->data );
/* if not getting the original caged mesh, get final derived mesh */
- } else {
+ }
+ else {
/* Make a dummy mesh, saves copying */
DerivedMesh *dm;
/* CustomDataMask mask = CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL; */
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index a2fb8dd9850..be28300eb01 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -570,7 +570,8 @@ static char *rna_FieldSettings_path(PointerRNA *ptr)
return BLI_sprintfN("force_field_1");
else if (part->pd2 == pd)
return BLI_sprintfN("force_field_2");
- } else {
+ }
+ else {
/* object force field */
Object *ob = (Object*)ptr->id.data;
@@ -607,7 +608,8 @@ static char *rna_EffectorWeight_path(PointerRNA *ptr)
if (part->effector_weights == ew)
return BLI_sprintfN("effector_weights");
- } else {
+ }
+ else {
Object *ob = (Object*)ptr->id.data;
ModifierData *md;
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index fd6c45c2828..3eac129a195 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -52,7 +52,7 @@ static StructRNA* rna_GameProperty_refine(struct PointerRNA *ptr)
{
bProperty *property = (bProperty*)ptr->data;
- switch (property->type){
+ switch (property->type) {
case GPROP_BOOL:
return &RNA_GameBooleanProperty;
case GPROP_INT:
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 80c654b9c10..ff336ba6693 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -146,7 +146,8 @@ EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, PropertyRN
if (ptr->type == &RNA_Sensor || RNA_struct_is_a(ptr->type, &RNA_Sensor)) {
ob = (Object *)ptr->id.data;
- } else {
+ }
+ else {
/* can't use ob from ptr->id.data because that enum is also used by operators */
ob = CTX_data_active_object(C);
}
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 5365c16cc3d..3491371ac06 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -231,7 +231,8 @@ static void rna_Sequence_use_color_balance_set(PointerRNA *ptr, int value)
seq->strip->color_balance->gain[c] = 1.0f;
}
}
- } else {
+ }
+ else {
seq->flag ^= SEQ_USE_COLOR_BALANCE;
}
}
@@ -248,7 +249,8 @@ static void rna_Sequence_use_proxy_set(PointerRNA *ptr, int value)
seq->strip->proxy->build_size_flags
= SEQ_PROXY_IMAGE_SIZE_25;
}
- } else {
+ }
+ else {
seq->flag ^= SEQ_USE_PROXY;
}
}
@@ -261,7 +263,8 @@ static void rna_Sequence_use_translation_set(PointerRNA *ptr, int value)
if (seq->strip->transform == NULL) {
seq->strip->transform = MEM_callocN(sizeof(struct StripTransform), "StripTransform");
}
- } else {
+ }
+ else {
seq->flag ^= SEQ_USE_TRANSFORM;
}
}
@@ -274,7 +277,8 @@ static void rna_Sequence_use_crop_set(PointerRNA *ptr, int value)
if (seq->strip->crop == NULL) {
seq->strip->crop = MEM_callocN(sizeof(struct StripCrop), "StripCrop");
}
- } else {
+ }
+ else {
seq->flag ^= SEQ_USE_CROP;
}
}
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 65350ba42a7..7cf2475f9de 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -602,7 +602,8 @@ static void rna_SpaceImageEditor_cursor_location_get(PointerRNA *ptr, float *val
if (sima->flag & SI_COORDFLOATS) {
copy_v2_v2(values, sima->cursor);
- } else {
+ }
+ else {
int w, h;
ED_space_image_size(sima, &w, &h);
@@ -617,7 +618,8 @@ static void rna_SpaceImageEditor_cursor_location_set(PointerRNA *ptr, const floa
if (sima->flag & SI_COORDFLOATS) {
copy_v2_v2(sima->cursor, values);
- } else {
+ }
+ else {
int w, h;
ED_space_image_size(sima, &w, &h);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 360f8222619..4fad3aaf815 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -790,7 +790,7 @@ static void rna_def_userdef_theme_space_generic(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* buttons */
-/* if(! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) { */
+/* if (! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) { */
prop = RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Region Background", "");
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index 28174bb56c6..bad122ab761 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -144,7 +144,8 @@ static wmKeyMap *rna_keymap_new(wmKeyConfig *keyconf, const char *idname, int sp
{
if (modal == 0) {
return WM_keymap_find(keyconf, idname, spaceid, regionid);
- } else {
+ }
+ else {
return WM_modalkeymap_add(keyconf, idname, NULL); /* items will be lazy init */
}
}