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-04-28 10:31:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-28 10:31:57 +0400
commitb340f930ec5639f24e7e2d47fab221fb752b61dd (patch)
tree0e880a36bb528d133af6d10701fc090716b3b7f8 /source/blender/editors/object
parent09dc600839904a198ab4ba3fad62ce58c2d3aa07 (diff)
style cleanup: changes to brace placement / newlines - for/while/if/switch
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c4
-rw-r--r--source/blender/editors/object/object_bake.c2
-rw-r--r--source/blender/editors/object/object_edit.c18
-rw-r--r--source/blender/editors/object/object_hook.c2
-rw-r--r--source/blender/editors/object/object_relations.c6
-rw-r--r--source/blender/editors/object/object_shapekey.c2
-rw-r--r--source/blender/editors/object/object_vgroup.c15
7 files changed, 26 insertions, 23 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 3717591e412..ba527e6fa6a 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -430,7 +430,7 @@ static Object *effector_add_type(bContext *C, wmOperator *op, int type)
ob= ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer);
rename_id(&ob->id, "Field");
- switch(type) {
+ switch (type) {
case PFIELD_WIND:
case PFIELD_VORTEX:
ob->empty_drawtype = OB_SINGLE_ARROW;
@@ -1680,7 +1680,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
id= obn->data;
didit= 0;
- switch(obn->type) {
+ switch (obn->type) {
case OB_MESH:
if (dupflag & USER_DUP_MESH) {
ID_NEW_US2( obn->data )
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 1f012c6f0be..8b22b4613b8 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -862,7 +862,7 @@ static void bake_images(MultiresBakeRender *bkr)
if (ibuf->x>0 && ibuf->y>0) {
ibuf->userdata= MEM_callocN(ibuf->y*ibuf->x, "MultiresBake imbuf mask");
- switch(bkr->mode) {
+ switch (bkr->mode) {
case RE_BAKE_NORMALS:
do_multires_bake(bkr, ima, apply_tangmat_callback, init_normal_data, NULL, free_normal_data);
break;
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 2fbc2966bc8..8531ec5701d 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1354,14 +1354,16 @@ static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(
ob = CTX_data_active_object(C);
while (ob && input->identifier) {
if ((input->value == OB_MODE_EDIT && ((ob->type == OB_MESH) || (ob->type == OB_ARMATURE) ||
- (ob->type == OB_CURVE) || (ob->type == OB_SURF) ||
- (ob->type == OB_FONT) || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) ||
- (input->value == OB_MODE_POSE && (ob->type == OB_ARMATURE)) ||
- (input->value == OB_MODE_PARTICLE_EDIT && ob->particlesystem.first) ||
- ((input->value == OB_MODE_SCULPT || input->value == OB_MODE_VERTEX_PAINT ||
- input->value == OB_MODE_WEIGHT_PAINT || input->value == OB_MODE_TEXTURE_PAINT) && (ob->type == OB_MESH)) ||
- (input->value == OB_MODE_OBJECT))
+ (ob->type == OB_CURVE) || (ob->type == OB_SURF) ||
+ (ob->type == OB_FONT) || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) ||
+ (input->value == OB_MODE_POSE && (ob->type == OB_ARMATURE)) ||
+ (input->value == OB_MODE_PARTICLE_EDIT && ob->particlesystem.first) ||
+ ((input->value == OB_MODE_SCULPT || input->value == OB_MODE_VERTEX_PAINT ||
+ input->value == OB_MODE_WEIGHT_PAINT || input->value == OB_MODE_TEXTURE_PAINT) && (ob->type == OB_MESH)) ||
+ (input->value == OB_MODE_OBJECT))
+ {
RNA_enum_item_add(&item, &totitem, input);
+ }
++input;
}
@@ -1401,7 +1403,7 @@ static int object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *o
if (mode == OB_MODE_OBJECT)
return 1;
- switch(ob->type) {
+ switch (ob->type) {
case OB_MESH:
if (mode & (OB_MODE_EDIT|OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT|OB_MODE_PARTICLE_EDIT))
return 1;
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index ef428b5b1b7..f4d8cd5ae11 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -301,7 +301,7 @@ static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int *
*tot= 0;
name[0]= 0;
- switch(obedit->type) {
+ switch (obedit->type) {
case OB_MESH:
{
Mesh *me= obedit->data;
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index a666f04034b..40e852ebf7c 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1232,7 +1232,7 @@ enum {
/* Return 1 if make link data is allow, zero otherwise */
static int allow_make_links_data(int ev, Object *ob, Object *obt)
{
- switch(ev) {
+ switch (ev) {
case MAKE_LINKS_OBDATA:
if (ob->type == obt->type && ob->type != OB_EMPTY)
return 1;
@@ -1268,7 +1268,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN(C, Object*, obt, selected_editable_objects) {
if (ob != obt) {
if (allow_make_links_data(event, ob, obt)) {
- switch(event) {
+ switch (event) {
case MAKE_LINKS_OBDATA: /* obdata */
id= obt->data;
id->us--;
@@ -1464,7 +1464,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
BKE_copy_animdata_id_action(id);
- switch(ob->type) {
+ switch (ob->type) {
case OB_LAMP:
ob->data= la= copy_lamp(ob->data);
for (a=0; a<MAX_MTEX; a++) {
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index 79b1ca13c9e..9e31fc2d765 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -113,7 +113,7 @@ static int ED_object_shape_key_remove(bContext *C, Object *ob)
if (key->refkey) {
/* apply new basis key on original data */
- switch(ob->type) {
+ switch (ob->type) {
case OB_MESH:
key_to_mesh(key->refkey, ob->data);
break;
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index b5c34f1c750..e74819f10bf 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -184,7 +184,7 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
*dvert_arr = NULL;
if (id) {
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_ME:
{
Mesh *me = (Mesh *)id;
@@ -287,7 +287,7 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
int ED_vgroup_give_array(ID *id, MDeformVert **dvert_arr, int *dvert_tot)
{
if (id) {
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_ME:
{
Mesh *me = (Mesh *)id;
@@ -412,7 +412,7 @@ static void ED_vgroup_nr_vert_add(Object *ob,
dw= defvert_find_index(dv, def_nr);
if (dw) {
- switch(assignmode) {
+ switch (assignmode) {
case WEIGHT_REPLACE:
dw->weight = weight;
break;
@@ -437,7 +437,7 @@ static void ED_vgroup_nr_vert_add(Object *ob,
* we must take a different form of action ...
*/
- switch(assignmode) {
+ switch (assignmode) {
case WEIGHT_SUBTRACT:
/* if we are subtracting then we don't
* need to do anything
@@ -1043,8 +1043,9 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
dm_deform_clear(dm, ob); dm = NULL;
}
}
- } while (wasChange && (distToStart-distToBe)/fabsf(distToStart-distToBe) ==
- (dists[bestIndex]-distToBe)/fabsf(dists[bestIndex]-distToBe));
+ } while (wasChange && ((distToStart - distToBe) / fabsf(distToStart - distToBe) ==
+ (dists[bestIndex] - distToBe) / fabsf(dists[bestIndex] - distToBe)));
+
MEM_freeN(upDown);
MEM_freeN(changes);
MEM_freeN(dists);
@@ -1193,7 +1194,7 @@ static void vgroup_lock_all(Object *ob, int action)
}
for (dg= ob->defbase.first; dg; dg= dg->next) {
- switch(action) {
+ switch (action) {
case SEL_SELECT:
dg->flag |= DG_LOCK_WEIGHT;
break;