From 46045fbb09684ebc74835168ff4c5924261e3fc0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 7 Mar 2012 04:53:43 +0000 Subject: style cleanup - braces & else / if's --- source/blender/blenkernel/intern/anim_sys.c | 30 ++++++++++------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'source/blender/blenkernel/intern/anim_sys.c') diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 90b411b6f20..db8bd8f2066 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -1124,15 +1124,12 @@ static short animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_i //printf("%p %s %i %f\n", ptr, path, array_index, value); /* get property to write to */ - if (RNA_path_resolve(ptr, path, &new_ptr, &prop)) - { + if (RNA_path_resolve(ptr, path, &new_ptr, &prop)) { /* set value - only for animatable numerical values */ - if (RNA_property_animateable(&new_ptr, prop)) - { + if (RNA_property_animateable(&new_ptr, prop)) { int array_len= RNA_property_array_length(&new_ptr, prop); - if (array_len && array_index >= array_len) - { + if (array_len && array_index >= array_len) { if (G.f & G_DEBUG) { printf("Animato: Invalid array index. ID = '%s', '%s[%d]', array length is %d \n", (ptr && ptr->id.data) ? (((ID *)ptr->id.data)->name+2) : "", @@ -1142,8 +1139,7 @@ static short animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_i return 0; } - switch (RNA_property_type(prop)) - { + switch (RNA_property_type(prop)) { case PROP_BOOLEAN: if (array_len) RNA_property_boolean_set_index(&new_ptr, prop, array_index, ANIMSYS_FLOAT_AS_BOOL(value)); @@ -1251,8 +1247,7 @@ static void animsys_evaluate_fcurves (PointerRNA *ptr, ListBase *list, AnimMappe /* check if this F-Curve doesn't belong to a muted group */ if ((fcu->grp == NULL) || (fcu->grp->flag & AGRP_MUTED)==0) { /* check if this curve should be skipped */ - if ((fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED)) == 0) - { + if ((fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED)) == 0) { calculate_fcurve(fcu, ctime); animsys_execute_fcurve(ptr, remap, fcu); } @@ -1277,8 +1272,7 @@ static void animsys_evaluate_drivers (PointerRNA *ptr, AnimData *adt, float ctim short ok= 0; /* check if this driver's curve should be skipped */ - if ((fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED)) == 0) - { + if ((fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED)) == 0) { /* check if driver itself is tagged for recalculation */ if ((driver) && !(driver->flag & DRIVER_FLAG_INVALID)/*&& (driver->flag & DRIVER_FLAG_RECALC)*/) { // XXX driver recalc flag is not set yet by depsgraph! /* evaluate this using values set already in other places */ @@ -1352,8 +1346,7 @@ void animsys_evaluate_action_group (PointerRNA *ptr, bAction *act, bActionGroup for (fcu= agrp->channels.first; (fcu) && (fcu->grp == agrp); fcu= fcu->next) { /* check if this curve should be skipped */ - if ((fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED)) == 0) - { + if ((fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED)) == 0) { calculate_fcurve(fcu, ctime); animsys_execute_fcurve(ptr, remap, fcu); } @@ -2195,11 +2188,9 @@ void BKE_animsys_evaluate_animdata (Scene *scene, ID *id, AnimData *adt, float c * that overrides 'rough' work in NLA */ // TODO: need to double check that this all works correctly - if ((recalc & ADT_RECALC_ANIM) || (adt->recalc & ADT_RECALC_ANIM)) - { + if ((recalc & ADT_RECALC_ANIM) || (adt->recalc & ADT_RECALC_ANIM)) { /* evaluate NLA data */ - if ((adt->nla_tracks.first) && !(adt->flag & ADT_NLA_EVAL_OFF)) - { + if ((adt->nla_tracks.first) && !(adt->flag & ADT_NLA_EVAL_OFF)) { /* evaluate NLA-stack * - active action is evaluated as part of the NLA stack as the last item */ @@ -2232,8 +2223,7 @@ void BKE_animsys_evaluate_animdata (Scene *scene, ID *id, AnimData *adt, float c animsys_evaluate_overrides(&id_ptr, adt); /* execute and clear all cached property update functions */ - if (scene) - { + if (scene) { Main *bmain = G.main; // xxx - to get passed in! RNA_property_update_cache_flush(bmain, scene); RNA_property_update_cache_free(); -- cgit v1.2.3