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
parentaede928bdc7902bb81ebb00b286dc5064cf54dd6 (diff)
style cleanup: add braces around checks - 'if ELEM() {...}', confuses some parsers that done expand macros.
-rw-r--r--source/blender/blenkernel/intern/action.c7
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c24
-rw-r--r--source/blender/blenkernel/intern/curve.c6
-rw-r--r--source/blender/blenkernel/intern/displist.c3
-rw-r--r--source/blender/blenkernel/intern/fcurve.c12
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c18
-rw-r--r--source/blender/blenkernel/intern/ipo.c2
-rw-r--r--source/blender/blenkernel/intern/key.c4
-rw-r--r--source/blender/blenkernel/intern/material.c6
-rw-r--r--source/blender/blenkernel/intern/nla.c56
-rw-r--r--source/blender/blenkernel/intern/object.c20
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c4
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c2
-rw-r--r--source/blender/editors/animation/drivers.c2
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c2
-rw-r--r--source/blender/editors/animation/keyframes_draw.c8
-rw-r--r--source/blender/editors/animation/keyframes_edit.c12
-rw-r--r--source/blender/editors/animation/keyframes_general.c2
-rw-r--r--source/blender/editors/animation/keyframing.c4
-rw-r--r--source/blender/editors/armature/editarmature.c4
-rw-r--r--source/blender/editors/armature/poseobject.c8
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c2
-rw-r--r--source/blender/editors/interface/interface_handlers.c6
-rw-r--r--source/blender/editors/interface/interface_widgets.c2
-rw-r--r--source/blender/editors/interface/view2d.c4
-rw-r--r--source/blender/editors/object/object_edit.c2
-rw-r--r--source/blender/editors/object/object_transform.c2
-rw-r--r--source/blender/editors/render/render_shading.c2
-rw-r--r--source/blender/editors/space_info/info_stats.c2
-rw-r--r--source/blender/editors/space_nla/nla_draw.c2
-rw-r--r--source/blender/editors/space_nla/nla_edit.c4
-rw-r--r--source/blender/editors/space_node/node_buttons.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c2
-rw-r--r--source/blender/editors/space_time/time_ops.c2
-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
-rw-r--r--source/blender/editors/transform/transform.c4
-rw-r--r--source/blender/editors/transform/transform_conversions.c2
-rw-r--r--source/blender/editors/transform/transform_generics.c4
-rw-r--r--source/blender/editors/transform/transform_manipulator.c2
-rw-r--r--source/blender/editors/transform/transform_orientations.c2
-rw-r--r--source/blender/editors/util/undo.c6
-rw-r--r--source/blender/nodes/shader/node_shader_util.c3
-rw-r--r--source/blender/render/intern/source/convertblender.c2
-rw-r--r--source/blender/render/intern/source/render_texture.c2
47 files changed, 153 insertions, 138 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index b78a11185cc..78668a5a2e4 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -464,10 +464,11 @@ bPoseChannel *get_active_posechannel (Object *ob)
{
bArmature *arm= (ob) ? ob->data : NULL;
bPoseChannel *pchan;
-
- if ELEM3(NULL, ob, ob->pose, arm)
+
+ if (ELEM3(NULL, ob, ob->pose, arm)) {
return NULL;
-
+ }
+
/* find active */
for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
if ((pchan->bone) && (pchan->bone == arm->act_bone) && (pchan->bone->layer & arm->layer))
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index a9267be4cc4..fd3fb6815f0 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -397,7 +397,7 @@ void action_move_fcurves_by_basepath (bAction *srcAct, bAction *dstAct, const ch
FCurve *fcu, *fcn=NULL;
/* sanity checks */
- if ELEM3(NULL, srcAct, dstAct, basepath) {
+ if (ELEM3(NULL, srcAct, dstAct, basepath)) {
if (G.f & G_DEBUG) {
printf("ERROR: action_partition_fcurves_by_basepath(%p, %p, %p) has insufficient info to work with\n",
(void *)srcAct, (void *)dstAct, (void *)basepath);
@@ -478,7 +478,7 @@ void BKE_animdata_separate_by_basepath (ID *srcID, ID *dstID, ListBase *basepath
LinkData *ld;
/* sanity checks */
- if ELEM(NULL, srcID, dstID) {
+ if (ELEM(NULL, srcID, dstID)) {
if (G.f & G_DEBUG)
printf("ERROR: no source or destination ID to separate AnimData with\n");
return;
@@ -488,7 +488,7 @@ void BKE_animdata_separate_by_basepath (ID *srcID, ID *dstID, ListBase *basepath
srcAdt = BKE_animdata_from_id(srcID);
dstAdt = BKE_id_add_animdata(dstID);
- if ELEM(NULL, srcAdt, dstAdt) {
+ if (ELEM(NULL, srcAdt, dstAdt)) {
if (G.f & G_DEBUG)
printf("ERROR: no AnimData for this pair of ID's\n");
return;
@@ -903,7 +903,7 @@ KS_Path *BKE_keyingset_find_path (KeyingSet *ks, ID *id, const char group_name[]
KS_Path *ksp;
/* sanity checks */
- if ELEM3(NULL, ks, rna_path, id)
+ if (ELEM3(NULL, ks, rna_path, id))
return NULL;
/* loop over paths in the current KeyingSet, finding the first one where all settings match
@@ -976,7 +976,7 @@ KS_Path *BKE_keyingset_add_path (KeyingSet *ks, ID *id, const char group_name[],
KS_Path *ksp;
/* sanity checks */
- if ELEM(NULL, ks, rna_path) {
+ if (ELEM(NULL, ks, rna_path)) {
printf("ERROR: no Keying Set and/or RNA Path to add path with \n");
return NULL;
}
@@ -1028,7 +1028,7 @@ KS_Path *BKE_keyingset_add_path (KeyingSet *ks, ID *id, const char group_name[],
void BKE_keyingset_free_path (KeyingSet *ks, KS_Path *ksp)
{
/* sanity check */
- if ELEM(NULL, ks, ksp)
+ if (ELEM(NULL, ks, ksp))
return;
/* free RNA-path info */
@@ -1338,7 +1338,7 @@ void animsys_evaluate_action_group (PointerRNA *ptr, bAction *act, bActionGroup
FCurve *fcu;
/* check if mapper is appropriate for use here (we set to NULL if it's inappropriate) */
- if ELEM(NULL, act, agrp) return;
+ if (ELEM(NULL, act, agrp)) return;
if ((remap) && (remap->target != act)) remap= NULL;
action_idcode_patch_check(ptr->id.data, act);
@@ -1710,14 +1710,14 @@ static void nlaeval_fmodifiers_join_stacks (ListBase *result, ListBase *list1, L
FModifier *fcm1, *fcm2;
/* if list1 is invalid... */
- if ELEM(NULL, list1, list1->first) {
+ if (ELEM(NULL, list1, list1->first)) {
if (list2 && list2->first) {
result->first= list2->first;
result->last= list2->last;
}
}
/* if list 2 is invalid... */
- else if ELEM(NULL, list2, list2->first) {
+ else if (ELEM(NULL, list2, list2->first)) {
result->first= list1->first;
result->last= list1->last;
}
@@ -1742,9 +1742,9 @@ static void nlaeval_fmodifiers_split_stacks (ListBase *list1, ListBase *list2)
FModifier *fcm1, *fcm2;
/* if list1/2 is invalid... just skip */
- if ELEM(NULL, list1, list2)
+ if (ELEM(NULL, list1, list2))
return;
- if ELEM(NULL, list1->first, list2->first)
+ if (ELEM(NULL, list1->first, list2->first))
return;
/* get endpoints */
@@ -2182,7 +2182,7 @@ void BKE_animsys_evaluate_animdata (Scene *scene, ID *id, AnimData *adt, float c
PointerRNA id_ptr;
/* sanity checks */
- if ELEM(NULL, id, adt)
+ if (ELEM(NULL, id, adt))
return;
/* get pointer to ID-block for RNA to use */
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 7aae0d52fe7..9232fe8ec04 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -1347,7 +1347,7 @@ void makebevelcurve(Scene *scene, Object *ob, ListBase *disp, int forRender)
}
while (dl) {
- if ELEM(dl->type, DL_POLY, DL_SEGM) {
+ if (ELEM(dl->type, DL_POLY, DL_SEGM)) {
dlnew= MEM_mallocN(sizeof(DispList), "makebevelcurve1");
*dlnew= *dl;
dlnew->verts= MEM_mallocN(3*sizeof(float)*dl->parts*dl->nr, "makebevelcurve1");
@@ -2878,8 +2878,8 @@ void sethandlesNurb(ListBase *editnurb, short code)
if (bezt->f1 & SELECT) bezt->h1= code;
if (bezt->f3 & SELECT) bezt->h2= code;
if (bezt->h1!=bezt->h2) {
- if ELEM(bezt->h1, HD_ALIGN, HD_AUTO) bezt->h1= HD_FREE;
- if ELEM(bezt->h2, HD_ALIGN, HD_AUTO) bezt->h2= HD_FREE;
+ if (ELEM(bezt->h1, HD_ALIGN, HD_AUTO)) bezt->h1 = HD_FREE;
+ if (ELEM(bezt->h2, HD_ALIGN, HD_AUTO)) bezt->h2 = HD_FREE;
}
}
bezt++;
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 7a34df85bdc..692eadd6bd3 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -123,8 +123,9 @@ int displist_has_faces(ListBase *lb)
{
DispList *dl;
for (dl= lb->first; dl; dl= dl->next) {
- if ELEM3(dl->type, DL_INDEX3, DL_INDEX4, DL_SURF)
+ if (ELEM3(dl->type, DL_INDEX3, DL_INDEX4, DL_SURF)) {
return 1;
+ }
}
return 0;
}
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 97e59df3353..5f1201ec378 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -156,7 +156,7 @@ void copy_fcurves (ListBase *dst, ListBase *src)
FCurve *dfcu, *sfcu;
/* sanity checks */
- if ELEM(NULL, dst, src)
+ if (ELEM(NULL, dst, src))
return;
/* clear destination list first */
@@ -738,7 +738,7 @@ void fcurve_store_samples (FCurve *fcu, void *data, int start, int end, FcuSampl
/* sanity checks */
// TODO: make these tests report errors using reports not printf's
- if ELEM(NULL, fcu, sample_cb) {
+ if (ELEM(NULL, fcu, sample_cb)) {
printf("Error: No F-Curve with F-Curve Modifiers to Bake\n");
return;
}
@@ -834,7 +834,7 @@ void testhandles_fcurve (FCurve *fcu, const short use_handle)
unsigned int a;
/* only beztriples have handles (bpoints don't though) */
- if ELEM(NULL, fcu, fcu->bezt)
+ if (ELEM(NULL, fcu, fcu->bezt))
return;
/* loop over beztriples */
@@ -1001,7 +1001,7 @@ static float dtar_get_prop_val (ChannelDriver *driver, DriverTarget *dtar)
float value= 0.0f;
/* sanity check */
- if ELEM(NULL, driver, dtar)
+ if (ELEM(NULL, driver, dtar))
return 0.0f;
id= dtar_id_ensure_proxy_from(dtar->id);
@@ -1075,7 +1075,7 @@ static bPoseChannel *dtar_get_pchan_ptr (ChannelDriver *driver, DriverTarget *dt
{
ID *id;
/* sanity check */
- if ELEM(NULL, driver, dtar)
+ if (ELEM(NULL, driver, dtar))
return NULL;
id= dtar_id_ensure_proxy_from(dtar->id);
@@ -1490,7 +1490,7 @@ void fcurve_free_driver(FCurve *fcu)
DriverVar *dvar, *dvarn;
/* sanity checks */
- if ELEM(NULL, fcu, fcu->driver)
+ if (ELEM(NULL, fcu, fcu->driver))
return;
driver= fcu->driver;
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index bc587449853..693c036d124 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -590,7 +590,7 @@ static float fcm_cycles_time (FCurve *fcu, FModifier *fcm, float UNUSED(cvalue),
ofs= lastkey[0];
}
}
- if ELEM(0, side, mode)
+ if ((ELEM(0, side, mode)))
return evaltime;
/* find relative place within a cycle */
@@ -1000,7 +1000,7 @@ FModifier *add_fmodifier (ListBase *modifiers, int type)
FModifier *fcm;
/* sanity checks */
- if ELEM(NULL, modifiers, fmi)
+ if (ELEM(NULL, modifiers, fmi))
return NULL;
/* special checks for whether modifier can be added */
@@ -1063,7 +1063,7 @@ void copy_fmodifiers (ListBase *dst, ListBase *src)
{
FModifier *fcm, *srcfcm;
- if ELEM(NULL, dst, src)
+ if (ELEM(NULL, dst, src))
return;
dst->first= dst->last= NULL;
@@ -1134,7 +1134,7 @@ FModifier *find_active_fmodifier (ListBase *modifiers)
FModifier *fcm;
/* sanity checks */
- if ELEM(NULL, modifiers, modifiers->first)
+ if (ELEM(NULL, modifiers, modifiers->first))
return NULL;
/* loop over modifiers until 'active' one is found */
@@ -1153,7 +1153,7 @@ void set_active_fmodifier (ListBase *modifiers, FModifier *fcm)
FModifier *fm;
/* sanity checks */
- if ELEM(NULL, modifiers, modifiers->first)
+ if (ELEM(NULL, modifiers, modifiers->first))
return;
/* deactivate all, and set current one active */
@@ -1178,7 +1178,7 @@ short list_has_suitable_fmodifier (ListBase *modifiers, int mtype, short acttype
return (modifiers && modifiers->first);
/* sanity checks */
- if ELEM(NULL, modifiers, modifiers->first)
+ if (ELEM(NULL, modifiers, modifiers->first))
return 0;
/* find the first mdifier fitting these criteria */
@@ -1258,7 +1258,7 @@ float evaluate_time_fmodifiers (ListBase *modifiers, FCurve *fcu, float cvalue,
FModifier *fcm;
/* sanity checks */
- if ELEM(NULL, modifiers, modifiers->last)
+ if (ELEM(NULL, modifiers, modifiers->last))
return evaltime;
/* Starting from the end of the stack, calculate the time effects of various stacked modifiers
@@ -1307,7 +1307,7 @@ void evaluate_value_fmodifiers (ListBase *modifiers, FCurve *fcu, float *cvalue,
FModifier *fcm;
/* sanity checks */
- if ELEM(NULL, modifiers, modifiers->first)
+ if (ELEM(NULL, modifiers, modifiers->first))
return;
/* evaluate modifiers */
@@ -1345,7 +1345,7 @@ void fcurve_bake_modifiers (FCurve *fcu, int start, int end)
/* sanity checks */
// TODO: make these tests report errors using reports not printf's
- if ELEM(NULL, fcu, fcu->modifiers.first) {
+ if (ELEM(NULL, fcu, fcu->modifiers.first)) {
printf("Error: No F-Curve with F-Curve Modifiers to Bake\n");
return;
}
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 57a2dc41f74..c454acd7c81 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -1518,7 +1518,7 @@ static void ipo_to_animdata (ID *id, Ipo *ipo, char actname[], char constname[],
ListBase drivers = {NULL, NULL};
/* sanity check */
- if ELEM(NULL, id, ipo)
+ if (ELEM(NULL, id, ipo))
return;
if (adt == NULL) {
printf("ERROR ipo_to_animdata(): adt invalid \n");
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index 097e7a4eb5e..fe776bd5eae 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -1466,7 +1466,7 @@ Key *ob_get_key(Object *ob)
Mesh *me= ob->data;
return me->key;
}
- else if ELEM(ob->type, OB_CURVE, OB_SURF) {
+ else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
Curve *cu= ob->data;
return cu->key;
}
@@ -1589,7 +1589,7 @@ char *key_get_curValue_rnaPath(Key *key, KeyBlock *kb)
PropertyRNA *prop;
/* sanity checks */
- if ELEM(NULL, key, kb)
+ if (ELEM(NULL, key, kb))
return NULL;
/* create the RNA pointer */
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index dd25092f7dd..f7351887b55 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -458,7 +458,7 @@ Material ***give_matarar(Object *ob)
me= ob->data;
return &(me->mat);
}
- else if ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF) {
+ else if (ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF)) {
cu= ob->data;
return &(cu->mat);
}
@@ -479,7 +479,7 @@ short *give_totcolp(Object *ob)
me= ob->data;
return &(me->totcol);
}
- else if ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF) {
+ else if (ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF)) {
cu= ob->data;
return &(cu->totcol);
}
@@ -903,7 +903,7 @@ static void do_init_render_material(Material *ma, int r_mode, float *amb)
ma->mapto |= mtex->mapto;
/* always get derivatives for these textures */
- if ELEM3(mtex->tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP) ma->texco |= TEXCO_OSA;
+ if (ELEM3(mtex->tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP)) ma->texco |= TEXCO_OSA;
else if (mtex->texflag & (MTEX_COMPAT_BUMP|MTEX_3TAP_BUMP|MTEX_5TAP_BUMP|MTEX_BICUBIC_BUMP)) ma->texco |= TEXCO_OSA;
if (ma->texco & (TEXCO_ORCO|TEXCO_REFL|TEXCO_NORM|TEXCO_STRAND|TEXCO_STRESS)) needuv= 1;
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index f67d3274b34..9c8bda97435 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -140,7 +140,7 @@ void free_nladata (ListBase *tracks)
NlaTrack *nlt, *nltn;
/* sanity checks */
- if ELEM(NULL, tracks, tracks->first)
+ if (ELEM(NULL, tracks, tracks->first))
return;
/* free tracks one by one */
@@ -221,7 +221,7 @@ void copy_nladata (ListBase *dst, ListBase *src)
NlaTrack *nlt, *nlt_d;
/* sanity checks */
- if ELEM(NULL, dst, src)
+ if (ELEM(NULL, dst, src))
return;
/* clear out the destination list first for precautions... */
@@ -319,7 +319,7 @@ NlaStrip *add_nlastrip_to_stack (AnimData *adt, bAction *act)
NlaTrack *nlt;
/* sanity checks */
- if ELEM(NULL, adt, act)
+ if (ELEM(NULL, adt, act))
return NULL;
/* create a new NLA strip */
@@ -586,7 +586,7 @@ void BKE_nlastrips_sort_strips (ListBase *strips)
NlaStrip *strip, *sstrip, *stripn;
/* sanity checks */
- if ELEM(NULL, strips, strips->first)
+ if (ELEM(NULL, strips, strips->first))
return;
/* we simply perform insertion sort on this list, since it is assumed that per track,
@@ -630,7 +630,7 @@ short BKE_nlastrips_add_strip (ListBase *strips, NlaStrip *strip)
short not_added = 1;
/* sanity checks */
- if ELEM(NULL, strips, strip)
+ if (ELEM(NULL, strips, strip))
return 0;
/* check if any space to add */
@@ -668,7 +668,7 @@ void BKE_nlastrips_make_metas (ListBase *strips, short temp)
NlaStrip *strip, *stripn;
/* sanity checks */
- if ELEM(NULL, strips, strips->first)
+ if (ELEM(NULL, strips, strips->first))
return;
/* group all continuous chains of selected strips into meta-strips */
@@ -719,7 +719,7 @@ void BKE_nlastrips_clear_metastrip (ListBase *strips, NlaStrip *strip)
NlaStrip *cs, *csn;
/* sanity check */
- if ELEM(NULL, strips, strip)
+ if (ELEM(NULL, strips, strip))
return;
/* move each one of the meta-strip's children before the meta-strip
@@ -744,7 +744,7 @@ void BKE_nlastrips_clear_metas (ListBase *strips, short onlySel, short onlyTemp)
NlaStrip *strip, *stripn;
/* sanity checks */
- if ELEM(NULL, strips, strips->first)
+ if (ELEM(NULL, strips, strips->first))
return;
/* remove meta-strips fitting the criteria of the arguments */
@@ -769,7 +769,7 @@ void BKE_nlastrips_clear_metas (ListBase *strips, short onlySel, short onlyTemp)
short BKE_nlameta_add_strip (NlaStrip *mstrip, NlaStrip *strip)
{
/* sanity checks */
- if ELEM(NULL, mstrip, strip)
+ if (ELEM(NULL, mstrip, strip))
return 0;
/* firstly, check if the meta-strip has space for this */
@@ -827,7 +827,7 @@ void BKE_nlameta_flush_transforms (NlaStrip *mstrip)
* - strip must exist
* - strip must be a meta-strip with some contents
*/
- if ELEM(NULL, mstrip, mstrip->strips.first)
+ if (ELEM(NULL, mstrip, mstrip->strips.first))
return;
if (mstrip->type != NLASTRIP_TYPE_META)
return;
@@ -899,7 +899,7 @@ NlaTrack *BKE_nlatrack_find_active (ListBase *tracks)
NlaTrack *nlt;
/* sanity check */
- if ELEM(NULL, tracks, tracks->first)
+ if (ELEM(NULL, tracks, tracks->first))
return NULL;
/* try to find the first active track */
@@ -920,7 +920,7 @@ void BKE_nlatrack_solo_toggle (AnimData *adt, NlaTrack *nlt)
NlaTrack *nt;
/* sanity check */
- if ELEM(NULL, adt, adt->nla_tracks.first)
+ if (ELEM(NULL, adt, adt->nla_tracks.first))
return;
/* firstly, make sure 'solo' flag for all tracks is disabled */
@@ -952,7 +952,7 @@ void BKE_nlatrack_set_active (ListBase *tracks, NlaTrack *nlt_a)
NlaTrack *nlt;
/* sanity check */
- if ELEM(NULL, tracks, tracks->first)
+ if (ELEM(NULL, tracks, tracks->first))
return;
/* deactive all the rest */
@@ -990,7 +990,7 @@ short BKE_nlatrack_has_space (NlaTrack *nlt, float start, float end)
void BKE_nlatrack_sort_strips (NlaTrack *nlt)
{
/* sanity checks */
- if ELEM(NULL, nlt, nlt->strips.first)
+ if (ELEM(NULL, nlt, nlt->strips.first))
return;
/* sort the strips with a more generic function */
@@ -1003,7 +1003,7 @@ void BKE_nlatrack_sort_strips (NlaTrack *nlt)
short BKE_nlatrack_add_strip (NlaTrack *nlt, NlaStrip *strip)
{
/* sanity checks */
- if ELEM(NULL, nlt, strip)
+ if (ELEM(NULL, nlt, strip))
return 0;
/* try to add the strip to the track using a more generic function */
@@ -1024,7 +1024,7 @@ short BKE_nlatrack_get_bounds (NlaTrack *nlt, float bounds[2])
return 0;
/* sanity checks */
- if ELEM(NULL, nlt, nlt->strips.first)
+ if (ELEM(NULL, nlt, nlt->strips.first))
return 0;
/* lower bound is first strip's start frame */
@@ -1047,7 +1047,7 @@ NlaStrip *BKE_nlastrip_find_active (NlaTrack *nlt)
NlaStrip *strip;
/* sanity check */
- if ELEM(NULL, nlt, nlt->strips.first)
+ if (ELEM(NULL, nlt, nlt->strips.first))
return NULL;
/* try to find the first active strip */
@@ -1146,7 +1146,7 @@ static short nlastrip_is_first (AnimData *adt, NlaStrip *strip)
NlaStrip *ns;
/* sanity checks */
- if ELEM(NULL, adt, strip)
+ if (ELEM(NULL, adt, strip))
return 0;
/* check if strip has any strips before it */
@@ -1176,7 +1176,7 @@ short BKE_nlatrack_has_animated_strips (NlaTrack *nlt)
NlaStrip *strip;
/* sanity checks */
- if ELEM(NULL, nlt, nlt->strips.first)
+ if (ELEM(NULL, nlt, nlt->strips.first))
return 0;
/* check each strip for F-Curves only (don't care about whether the flags are set) */
@@ -1195,7 +1195,7 @@ short BKE_nlatracks_have_animated_strips (ListBase *tracks)
NlaTrack *nlt;
/* sanity checks */
- if ELEM(NULL, tracks, tracks->first)
+ if (ELEM(NULL, tracks, tracks->first))
return 0;
/* check each track, stopping on the first hit */
@@ -1279,7 +1279,7 @@ void BKE_nlastrip_validate_name (AnimData *adt, NlaStrip *strip)
NlaTrack *nlt;
/* sanity checks */
- if ELEM(NULL, adt, strip)
+ if (ELEM(NULL, adt, strip))
return;
/* give strip a default name if none already */
@@ -1376,7 +1376,7 @@ static void BKE_nlastrip_validate_autoblends (NlaTrack *nlt, NlaStrip *nls)
float *ns=NULL, *ne=NULL;
/* sanity checks */
- if ELEM(NULL, nls, nlt)
+ if (ELEM(NULL, nls, nlt))
return;
if ((nlt->prev == NULL) && (nlt->next == NULL))
return;
@@ -1422,7 +1422,7 @@ void BKE_nla_validate_state (AnimData *adt)
NlaTrack *nlt;
/* sanity checks */
- if ELEM(NULL, adt, adt->nla_tracks.first)
+ if (ELEM(NULL, adt, adt->nla_tracks.first))
return;
/* adjust blending values for auto-blending, and also do an initial pass to find the earliest strip */
@@ -1476,7 +1476,7 @@ void BKE_nla_action_pushdown (AnimData *adt)
/* sanity checks */
// TODO: need to report the error for this
- if ELEM(NULL, adt, adt->action)
+ if (ELEM(NULL, adt, adt->action))
return;
/* if the action is empty, we also shouldn't try to add to stack,
@@ -1524,7 +1524,7 @@ short BKE_nla_tweakmode_enter (AnimData *adt)
NlaStrip *strip, *activeStrip=NULL;
/* verify that data is valid */
- if ELEM(NULL, adt, adt->nla_tracks.first)
+ if (ELEM(NULL, adt, adt->nla_tracks.first))
return 0;
/* if block is already in tweakmode, just leave, but we should report
@@ -1575,7 +1575,7 @@ short BKE_nla_tweakmode_enter (AnimData *adt)
}
}
- if ELEM3(NULL, activeTrack, activeStrip, activeStrip->act) {
+ if (ELEM3(NULL, activeTrack, activeStrip, activeStrip->act)) {
if (G.f & G_DEBUG) {
printf("NLA tweakmode enter - neither active requirement found \n");
printf("\tactiveTrack = %p, activeStrip = %p \n", (void *)activeTrack, (void *)activeStrip);
@@ -1625,7 +1625,7 @@ void BKE_nla_tweakmode_exit (AnimData *adt)
NlaTrack *nlt;
/* verify that data is valid */
- if ELEM(NULL, adt, adt->nla_tracks.first)
+ if (ELEM(NULL, adt, adt->nla_tracks.first))
return;
/* hopefully the flag is correct - skip if not on */
@@ -1667,7 +1667,7 @@ static void UNUSED_FUNCTION(BKE_nla_bake) (Scene *scene, ID *UNUSED(id), AnimDat
* 1) Scene and AnimData must be provided
* 2) there must be tracks to merge...
*/
- if ELEM3(NULL, scene, adt, adt->nla_tracks.first)
+ if (ELEM3(NULL, scene, adt, adt->nla_tracks.first))
return;
/* if animdata currently has an action, 'push down' this onto the stack first */
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 4a9b4978705..178c69af4d6 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -413,7 +413,7 @@ void unlink_object(Object *ob)
modifiers_foreachObjectLink(obt, unlink_object__unlinkModifierLinks, ob);
- if ELEM(obt->type, OB_CURVE, OB_FONT) {
+ if (ELEM(obt->type, OB_CURVE, OB_FONT)) {
cu= obt->data;
if (cu->bevobj==ob) {
@@ -2950,11 +2950,19 @@ static KeyBlock *insert_curvekey(Scene *scene, Object *ob, const char *name, int
}
KeyBlock *object_insert_shape_key(Scene *scene, Object *ob, const char *name, int from_mix)
-{
- if (ob->type==OB_MESH) return insert_meshkey(scene, ob, name, from_mix);
- else if ELEM(ob->type, OB_CURVE, OB_SURF)return insert_curvekey(scene, ob, name, from_mix);
- else if (ob->type==OB_LATTICE) return insert_lattkey(scene, ob, name, from_mix);
- else return NULL;
+{
+ switch (ob->type) {
+ case OB_MESH:
+ return insert_meshkey(scene, ob, name, from_mix);
+ case OB_CURVE:
+ case OB_SURF:
+ return insert_curvekey(scene, ob, name, from_mix);
+ case OB_LATTICE:
+ return insert_lattkey(scene, ob, name, from_mix);
+ default:
+ return NULL;
+ }
+
}
/* most important if this is modified it should _always_ return True, in certain
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index b2839db55cf..01ab36133fd 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -2730,7 +2730,7 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
float y, ymid, ytext;
/* sanity checks - don't draw anything */
- if ELEM(NULL, acf, ale)
+ if (ELEM(NULL, acf, ale))
return;
/* get initial offset */
@@ -3158,7 +3158,7 @@ void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *al
short offset;
/* sanity checks - don't draw anything */
- if ELEM3(NULL, acf, ale, block)
+ if (ELEM3(NULL, acf, ale, block))
return;
/* get initial offset */
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 169d6b94413..6f4d4c4a431 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -61,7 +61,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* sanity checks */
if (name == NULL)
return icon;
- else if ELEM3(NULL, id, fcu, fcu->rna_path) {
+ else if (ELEM3(NULL, id, fcu, fcu->rna_path)) {
if (fcu == NULL)
strcpy(name, "<invalid>");
else if (fcu->rna_path == NULL)
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 881de2904f7..9c4f96ebe6d 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -84,7 +84,7 @@ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_ind
FCurve *fcu;
/* sanity checks */
- if ELEM(NULL, id, rna_path)
+ if (ELEM(NULL, id, rna_path))
return NULL;
/* init animdata if none available yet */
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index 9b3e481d118..d19a137a6a8 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -784,7 +784,7 @@ short ANIM_fmodifiers_copy_to_buf (ListBase *modifiers, short active)
short ok = 1;
/* sanity checks */
- if ELEM(NULL, modifiers, modifiers->first)
+ if (ELEM(NULL, modifiers, modifiers->first))
return 0;
/* copy the whole list, or just the active one? */
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 1c0bb9beaa1..146aea401ec 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -189,7 +189,7 @@ static void nupdate_ak_gpframe (void *node, void *data)
/* Add the given BezTriple to the given 'list' of Keyframes */
static void add_bezt_to_keycolumns_list(DLRBT_Tree *keys, BezTriple *bezt)
{
- if ELEM(NULL, keys, bezt)
+ if (ELEM(NULL, keys, bezt))
return;
else
BLI_dlrbTree_add(keys, compare_ak_bezt, nalloc_ak_bezt, nupdate_ak_bezt, bezt);
@@ -198,7 +198,7 @@ static void add_bezt_to_keycolumns_list(DLRBT_Tree *keys, BezTriple *bezt)
/* Add the given GPencil Frame to the given 'list' of Keyframes */
static void add_gpframe_to_keycolumns_list(DLRBT_Tree *keys, bGPDframe *gpf)
{
- if ELEM(NULL, keys, gpf)
+ if (ELEM(NULL, keys, gpf))
return;
else
BLI_dlrbTree_add(keys, compare_ak_gpframe, nalloc_ak_gpframe, nupdate_ak_gpframe, gpf);
@@ -538,7 +538,7 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel
glEnable(GL_LINE_SMOOTH);
/* draw! */
- if ELEM(mode, KEYFRAME_SHAPE_INSIDE, KEYFRAME_SHAPE_BOTH) {
+ if (ELEM(mode, KEYFRAME_SHAPE_INSIDE, KEYFRAME_SHAPE_BOTH)) {
/* interior - hardcoded colors (for selected and unselected only) */
switch (key_type) {
case BEZT_KEYTYPE_BREAKDOWN: /* bluish frames for now */
@@ -574,7 +574,7 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel
glCallList(displist2);
}
- if ELEM(mode, KEYFRAME_SHAPE_FRAME, KEYFRAME_SHAPE_BOTH) {
+ if (ELEM(mode, KEYFRAME_SHAPE_FRAME, KEYFRAME_SHAPE_BOTH)) {
/* exterior - black frame */
glColor4f(0.0f, 0.0f, 0.0f, alpha);
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index c6aed3133e2..4e59216a39c 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -760,11 +760,13 @@ KeyframeEditFunc ANIM_editkeyframes_mirror(short type)
/* standard validation step for a few of these (implemented as macro for inlining without fn-call overhead):
* "if the handles are not of the same type, set them to type free"
*/
-#define ENSURE_HANDLES_MATCH(bezt) \
- if (bezt->h1 != bezt->h2) { \
- if ELEM3(bezt->h1, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM) bezt->h1= HD_FREE; \
- if ELEM3(bezt->h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM) bezt->h2= HD_FREE; \
- }
+#define ENSURE_HANDLES_MATCH(bezt) \
+ if (bezt->h1 != bezt->h2) { \
+ if (ELEM3(bezt->h1, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) \
+ bezt->h1= HD_FREE; \
+ if (ELEM3(bezt->h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) \
+ bezt->h2= HD_FREE; \
+ }
/* Sets the selected bezier handles to type 'auto' */
static short set_bezier_auto(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 5d6d02bef63..831b8d21b01 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -145,7 +145,7 @@ void duplicate_fcurve_keys(FCurve *fcu)
int i;
/* this can only work when there is an F-Curve, and also when there are some BezTriples */
- if ELEM(NULL, fcu, fcu->bezt)
+ if (ELEM(NULL, fcu, fcu->bezt))
return;
for (i=0; i < fcu->totvert; i++) {
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 71e70536d15..ba413fda00c 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -156,7 +156,7 @@ FCurve *verify_fcurve (bAction *act, const char group[], const char rna_path[],
FCurve *fcu;
/* sanity checks */
- if ELEM(NULL, act, rna_path)
+ if (ELEM(NULL, act, rna_path))
return NULL;
/* try to find f-curve matching for this setting
@@ -980,7 +980,7 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
int ret= 0;
/* sanity checks */
- if ELEM(NULL, id, adt) {
+ if (ELEM(NULL, id, adt)) {
BKE_report(reports, RPT_ERROR, "No ID-Block and/Or AnimData to delete keyframe from");
return 0;
}
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 4090fc1acaa..2211e6929a2 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -3055,7 +3055,7 @@ static int armature_merge_exec (bContext *C, wmOperator *op)
short type= RNA_enum_get(op->ptr, "type");
/* sanity checks */
- if ELEM(NULL, obedit, arm)
+ if (ELEM(NULL, obedit, arm))
return OPERATOR_CANCELLED;
/* for now, there's only really one type of merging that's performed... */
@@ -4898,7 +4898,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op,
short autokey = 0;
/* sanity checks */
- if ELEM(NULL, clear_func, default_ksName) {
+ if (ELEM(NULL, clear_func, default_ksName)) {
BKE_report(op->reports, RPT_ERROR, "Programming error: missing clear transform func or Keying Set Name");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 3d33930fa49..6768c884868 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -256,7 +256,7 @@ static void ED_pose_clear_paths(Object *ob)
bPoseChannel *pchan;
short skipped = 0;
- if ELEM(NULL, ob, ob->pose)
+ if (ELEM(NULL, ob, ob->pose))
return;
/* free the motionpath blocks, but also take note of whether we skipped some... */
@@ -289,7 +289,7 @@ static int pose_clear_paths_exec (bContext *C, wmOperator *UNUSED(op))
ob= object_pose_armature_get(CTX_data_active_object(C));
/* only continue if there's an object */
- if ELEM(NULL, ob, ob->pose)
+ if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
/* use the backend function for this */
@@ -1110,7 +1110,7 @@ static int pose_copy_exec (bContext *C, wmOperator *op)
Object *ob= object_pose_armature_get(CTX_data_active_object(C));
/* sanity checking */
- if ELEM(NULL, ob, ob->pose) {
+ if (ELEM(NULL, ob, ob->pose)) {
BKE_report(op->reports, RPT_ERROR, "No Pose to Copy");
return OPERATOR_CANCELLED;
}
@@ -1155,7 +1155,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOC_ROT_SCALE_ID);
/* sanity checks */
- if ELEM(NULL, ob, ob->pose)
+ if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
if (g_posebuf == NULL) {
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index ced7dab91f4..d48cfaab63c 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -332,7 +332,7 @@ static int gp_actframe_delete_exec (bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_ERROR, "No Grease Pencil data");
return OPERATOR_CANCELLED;
}
- if ELEM(NULL, gpl, gpf) {
+ if (ELEM(NULL, gpl, gpf)) {
BKE_report(op->reports, RPT_ERROR, "No active frame to delete");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index b21c059fcc1..3cd764d2eb3 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1313,7 +1313,7 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
*
* Admittedly, this is a bit hacky, but it works much nicer from an ergonomic standpoint!
*/
- if ELEM(NULL, sima, sima->image) {
+ if (ELEM(NULL, sima, sima->image)) {
/* make strokes be drawn in screen space */
p->gpd->sbuffer_sflag &= ~GP_STROKE_2DSPACE;
p->gpd->flag &= ~GP_DATA_VIEWALIGN;
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 21c3f4ca038..ce437fde69e 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -344,8 +344,8 @@ static void ui_apply_autokey_undo(bContext *C, uiBut *but)
const char *str= NULL;
/* define which string to use for undo */
- if ELEM(but->type, LINK, INLINK) str= "Add button link";
- else if ELEM(but->type, MENU, ICONTEXTROW) str= but->drawstr;
+ if (ELEM(but->type, LINK, INLINK)) str = "Add button link";
+ else if (ELEM(but->type, MENU, ICONTEXTROW)) str = but->drawstr;
else if (but->drawstr[0]) str= but->drawstr;
else str= but->tip;
@@ -1121,7 +1121,7 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
}
/* numeric value */
- if ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI) {
+ if (ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI)) {
if (but->poin==NULL && but->rnapoin.data==NULL);
else if (mode=='c') {
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 3baa672e42d..b7e2ba1c179 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -876,7 +876,7 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect
height= UI_DPI_ICON_SIZE;
/* calculate blend color */
- if ELEM4(but->type, TOG, ROW, TOGN, LISTROW) {
+ if (ELEM4(but->type, TOG, ROW, TOGN, LISTROW)) {
if (but->flag & UI_SELECT);
else if (but->flag & UI_ACTIVE);
else alpha= 0.5f;
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 9072db77b6f..792ea88baa7 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -1776,8 +1776,10 @@ void UI_view2d_scrollers_free(View2DScrollers *scrollers)
void UI_view2d_listview_cell_to_view(View2D *v2d, short columnwidth, short rowheight, float startx, float starty, int column, int row, rctf *rect)
{
/* sanity checks */
- if ELEM(NULL, v2d, rect)
+ if (ELEM(NULL, v2d, rect)) {
return;
+ }
+
if ((columnwidth <= 0) && (rowheight <= 0)) {
rect->xmin = rect->xmax = 0.0f;
rect->ymin = rect->ymax = 0.0f;
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 09625e30eaf..03ded30fb59 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1215,7 +1215,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
done= 1;
}
- else if ELEM(ob->type, OB_SURF, OB_CURVE) {
+ else if (ELEM(ob->type, OB_SURF, OB_CURVE)) {
cu= ob->data;
for (nu=cu->nurb.first; nu; nu=nu->next) {
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 8200bbef2ee..1d502aeb55c 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -216,7 +216,7 @@ static int object_clear_transform_generic_exec(bContext *C, wmOperator *op,
KeyingSet *ks;
/* sanity checks */
- if ELEM(NULL, clear_func, default_ksName) {
+ if (ELEM(NULL, clear_func, default_ksName)) {
BKE_report(op->reports, RPT_ERROR, "Programming error: missing clear transform func or Keying Set Name");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 0aeeb0f71e2..260817d743f 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -232,7 +232,7 @@ static int material_slot_de_select(bContext *C, int select)
EDBM_deselect_by_material(em, ob->actcol-1, select);
}
}
- else if ELEM(ob->type, OB_CURVE, OB_SURF) {
+ else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
ListBase *nurbs= curve_editnurbs((Curve*)ob->data);
Nurb *nu;
BPoint *bp;
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 59e4a1aaf04..a736fd01b2c 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -176,7 +176,7 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
stats->totvert+=2;
}
}
- else if ELEM(obedit->type, OB_CURVE, OB_SURF) { /* OB_FONT has no cu->editnurb */
+ else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { /* OB_FONT has no cu->editnurb */
/* Curve Edit */
Curve *cu= obedit->data;
Nurb *nu;
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 0b8565b93a2..7ed49025814 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -121,7 +121,7 @@ static void nla_action_draw_keyframes (AnimData *adt, bAction *act, View2D *v2d,
action_to_keylist(adt, act, &keys, NULL);
BLI_dlrbTree_linkedlist_sync(&keys);
- if ELEM(NULL, act, keys.first)
+ if (ELEM(NULL, act, keys.first))
return;
/* draw a darkened region behind the strips
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index d191f1d1d35..0c2dc7493e2 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -520,7 +520,7 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
NlaStrip *s1, *s2;
/* get initial pair of strips */
- if ELEM(nlt->strips.first, NULL, nlt->strips.last)
+ if (ELEM(nlt->strips.first, NULL, nlt->strips.last))
continue;
s1= nlt->strips.first;
s2= s1->next;
@@ -530,7 +530,7 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
NlaStrip *strip;
/* check if both are selected */
- if ELEM(0, (s1->flag & NLASTRIP_FLAG_SELECT), (s2->flag & NLASTRIP_FLAG_SELECT))
+ if (ELEM(0, (s1->flag & NLASTRIP_FLAG_SELECT), (s2->flag & NLASTRIP_FLAG_SELECT)))
continue;
/* check if there's space between the two */
if (IS_EQF(s1->end, s2->start))
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c
index 19eebe4d320..dac185bf46e 100644
--- a/source/blender/editors/space_node/node_buttons.c
+++ b/source/blender/editors/space_node/node_buttons.c
@@ -98,7 +98,7 @@ static void active_node_panel(const bContext *C, Panel *pa)
PointerRNA ptr;
/* verify pointers, and create RNA pointer for the node */
- if ELEM(NULL, ntree, node)
+ if (ELEM(NULL, ntree, node))
return;
//if (node->id) /* for group nodes */
// RNA_pointer_create(node->id, &RNA_Node, node, &ptr);
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 45830eed223..c4fe337ba58 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -1222,7 +1222,7 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S
WM_operator_name_call(C, "OUTLINER_OT_animdata_operation", WM_OP_INVOKE_REGION_WIN, NULL);
else if (datalevel == TSE_DRIVER_BASE)
/* do nothing... no special ops needed yet */;
- else if ELEM3(datalevel, TSE_R_LAYER_BASE, TSE_R_LAYER, TSE_R_PASS)
+ else if (ELEM3(datalevel, TSE_R_LAYER_BASE, TSE_R_LAYER, TSE_R_PASS))
/*WM_operator_name_call(C, "OUTLINER_OT_renderdata_operation", WM_OP_INVOKE_REGION_WIN, NULL)*/;
else
WM_operator_name_call(C, "OUTLINER_OT_data_operation", WM_OP_INVOKE_REGION_WIN, NULL);
diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c
index 3eaf2b8100e..1c1f7a69865 100644
--- a/source/blender/editors/space_time/time_ops.c
+++ b/source/blender/editors/space_time/time_ops.c
@@ -143,7 +143,7 @@ static int time_view_all_exec (bContext *C, wmOperator *UNUSED(op))
View2D *v2d= (ar) ? &ar->v2d : NULL;
float extra;
- if ELEM(NULL, scene, ar)
+ if (ELEM(NULL, scene, ar))
return OPERATOR_CANCELLED;
/* set extents of view to start/end frames (Preview Range too) */
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;
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 04b6a095117..68b7268596c 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1694,7 +1694,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
/* same as TFM_TIME_EXTEND, but we need the mode info for later
* so that duplicate-culling will work properly
*/
- if ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)
+ if (ELEM(t->spacetype, SPACE_IPO, SPACE_NLA))
initTranslation(t);
else
initTimeTranslate(t);
@@ -1706,7 +1706,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
* (for Graph/NLA Editors only since they uses 'standard' transforms to get 2D movement)
* depending on which editor this was called from
*/
- if ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)
+ if (ELEM(t->spacetype, SPACE_IPO, SPACE_NLA))
initTranslation(t);
else
initTimeTranslate(t);
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 6669bfdb3ca..60ec08fcb5d 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -5927,7 +5927,7 @@ void createTransData(bContext *C, TransInfo *t)
if (t->obedit->type == OB_MESH) {
createTransEditVerts(C, t);
}
- else if ELEM(t->obedit->type, OB_CURVE, OB_SURF) {
+ else if (ELEM(t->obedit->type, OB_CURVE, OB_SURF)) {
createTransCurveVerts(C, t);
}
else if (t->obedit->type==OB_LATTICE) {
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 8e22ccd943d..6dbab08ba7f 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -269,7 +269,7 @@ static void animrecord_check_state (Scene *scene, ID *id, wmTimer *animtimer)
ScreenAnimData *sad= (animtimer) ? animtimer->customdata : NULL;
/* sanity checks */
- if ELEM3(NULL, scene, id, sad)
+ if (ELEM3(NULL, scene, id, sad))
return;
/* check if we need a new strip if:
@@ -673,7 +673,7 @@ static void recalcData_view3d(TransInfo *t)
Base *base = t->scene->basact;
if (t->obedit) {
- if ELEM(t->obedit->type, OB_CURVE, OB_SURF) {
+ if (ELEM(t->obedit->type, OB_CURVE, OB_SURF)) {
Curve *cu= t->obedit->data;
ListBase *nurbs= curve_editnurbs(cu);
Nurb *nu= nurbs->first;
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index eb1d8e1df5c..ece556f11ae 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -377,7 +377,7 @@ int calc_manipulator_stats(const bContext *C)
}
}
}
- else if ELEM(obedit->type, OB_CURVE, OB_SURF) {
+ else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
Curve *cu= obedit->data;
float center[3];
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 092b9c27929..2a53a8e4ad2 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -712,7 +712,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
}
}
} /* end editmesh */
- else if ELEM(obedit->type, OB_CURVE, OB_SURF) {
+ else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
Curve *cu= obedit->data;
Nurb *nu;
BezTriple *bezt;
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index e46fe19d306..40a95fc08ba 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -105,7 +105,7 @@ void ED_undo_push(bContext *C, const char *str)
if (obedit->type==OB_MESH)
undo_push_mesh(C, str);
- else if ELEM(obedit->type, OB_CURVE, OB_SURF)
+ else if (ELEM(obedit->type, OB_CURVE, OB_SURF))
undo_push_curve(C, str);
else if (obedit->type==OB_FONT)
undo_push_font(C, str);
@@ -168,7 +168,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
ED_text_undo_step(C, step);
}
else if (obedit) {
- if ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE) {
+ if (ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE)) {
if (undoname)
undo_editmode_name(C, undoname);
else
@@ -260,7 +260,7 @@ int ED_undo_valid(const bContext *C, const char *undoname)
return 1;
}
else if (obedit) {
- if ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE) {
+ if (ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE)) {
return undo_editmode_valid(undoname);
}
}
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c
index df2f7879231..90c62bc47ac 100644
--- a/source/blender/nodes/shader/node_shader_util.c
+++ b/source/blender/nodes/shader/node_shader_util.c
@@ -88,8 +88,9 @@ void ntreeShaderGetTexcoMode(bNodeTree *ntree, int r_mode, short *texco, int *mo
if (node->type==SH_NODE_TEXTURE) {
if ((r_mode & R_OSA) && node->id) {
Tex *tex= (Tex *)node->id;
- if ELEM3(tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP)
+ if (ELEM3(tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP)) {
*texco |= TEXCO_OSA|NEED_UV;
+ }
}
/* usability exception... without input we still give the node orcos */
sock= node->inputs.first;
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index b6a25985d33..ff6f83cc946 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -4521,7 +4521,7 @@ static void init_render_object_data(Render *re, ObjectRen *obr, int timeoffset)
render_new_particle_system(re, obr, psys, timeoffset);
}
else {
- if ELEM(ob->type, OB_FONT, OB_CURVE)
+ if (ELEM(ob->type, OB_FONT, OB_CURVE))
init_render_curve(re, obr, timeoffset);
else if (ob->type==OB_SURF)
init_render_surf(re, obr, timeoffset);
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 3346cf3c261..453bb0aeeb6 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -1029,7 +1029,7 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d
dyt[1]/= 2.0f;
dyt[2]/= 2.0f;
}
- else if ELEM(wrap, MTEX_TUBE, MTEX_SPHERE) {
+ else if (ELEM(wrap, MTEX_TUBE, MTEX_SPHERE)) {
/* exception: the seam behind (y<0.0) */
ok= 1;
if (t[1]<=0.0f) {