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-26 02:35:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-26 02:35:18 +0400
commit6faeac9fe2867aca9c111e4f86f74912c115eddd (patch)
treef6422a603ed6546fa5251582d83151f8415e657b /source/blender/editors/space_view3d
parentaede928bdc7902bb81ebb00b286dc5064cf54dd6 (diff)
style cleanup: add braces around checks - 'if ELEM() {...}', confuses some parsers that done expand macros.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c8
-rw-r--r--source/blender/editors/space_view3d/drawobject.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c8
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index aae0348de20..fae271e5bee 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -1875,7 +1875,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
/* wire draw over solid only in posemode */
if ((dt <= OB_WIRE) || (arm->flag & ARM_POSEMODE) || ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) {
/* draw line check first. we do selection indices */
- if ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) {
+ if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) {
if (arm->flag & ARM_POSEMODE)
index= base->selcol;
}
@@ -2139,7 +2139,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt)
/* if wire over solid, set offset */
index= -1;
glLoadName(-1);
- if ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) {
+ if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) {
if (G.f & G_PICKSEL)
index= 0;
}
@@ -2203,7 +2203,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt)
/* restore */
if (index!=-1) glLoadName(-1);
- if ELEM(arm->drawtype,ARM_LINE,ARM_WIRE);
+ if (ELEM(arm->drawtype,ARM_LINE,ARM_WIRE));
else if (dt>OB_WIRE) bglPolygonOffset(rv3d->dist, 0.0f);
/* finally names and axes */
@@ -2462,7 +2462,7 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
int cfrao, flago;
/* pre conditions, get an action with sufficient frames */
- if ELEM(NULL, adt, adt->action)
+ if (ELEM(NULL, adt, adt->action))
return;
calc_action_range(adt->action, &start, &end, 0);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index e8e1083805a..00ce6897c2c 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1365,7 +1365,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
glEnd();
}
}
- else if ELEM(la->type, LA_HEMI, LA_SUN) {
+ else if (ELEM(la->type, LA_HEMI, LA_SUN)) {
/* draw the line from the circle along the dist */
glBegin(GL_LINE_STRIP);
@@ -6123,7 +6123,7 @@ static void draw_bounding_volume(Scene *scene, Object *ob, char type)
if (ob->type==OB_MESH) {
bb= mesh_get_bb(ob);
}
- else if ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT) {
+ else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
bb= ob->bb ? ob->bb : ( (Curve *)ob->data )->bb;
}
else if (ob->type==OB_MBALL) {
@@ -6157,7 +6157,7 @@ static void drawtexspace(Object *ob)
if (ob->type==OB_MESH) {
mesh_get_texspace(ob->data, loc, NULL, size);
}
- else if ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT) {
+ else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
Curve *cu= ob->data;
copy_v3_v3(size, cu->size);
copy_v3_v3(loc, cu->loc);
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index fdaf34e2e3c..1d8395c0967 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -523,7 +523,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
if (obedit) {
tottrans= 0;
- if ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL)
+ if (ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL))
make_trans_verts(obedit, bmat[0], bmat[1], 0);
if (tottrans==0) return OPERATOR_CANCELLED;
@@ -664,7 +664,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
if (obedit) {
tottrans= 0;
- if ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL)
+ if (ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL))
make_trans_verts(obedit, bmat[0], bmat[1], 0);
if (tottrans==0) return OPERATOR_CANCELLED;
@@ -879,7 +879,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
if (obedit) {
tottrans=0;
- if ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL)
+ if (ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL))
make_trans_verts(obedit, bmat[0], bmat[1], TM_ALL_JOINTS|TM_SKIP_HANDLES);
if (tottrans==0) return OPERATOR_CANCELLED;
@@ -1063,7 +1063,7 @@ int minmax_verts(Object *obedit, float *min, float *max)
int a;
tottrans=0;
- if ELEM5(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE)
+ if (ELEM5(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE))
make_trans_verts(obedit, bmat[0], bmat[1], TM_ALL_JOINTS);
if (tottrans==0) return 0;