From e86e0aad55675a5c4473d0538146dbccda7613e8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 25 Mar 2019 10:15:20 +1100 Subject: Cleanup: use braces for interface code --- source/blender/editors/interface/interface_anim.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'source/blender/editors/interface/interface_anim.c') diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index c8a9f3b9446..a4476b4d2f1 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -86,16 +86,19 @@ void ui_but_anim_flag(uiBut *but, float cfra) * we need to correct the frame number to "look inside" the * remapped action */ - if (adt) + if (adt) { cfra = BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP); + } - if (fcurve_frame_has_keyframe(fcu, cfra, 0)) + if (fcurve_frame_has_keyframe(fcu, cfra, 0)) { but->flag |= UI_BUT_ANIMATED_KEY; + } /* XXX: this feature is totally broken and useless with NLA */ if (adt == NULL || adt->nla_tracks.first == NULL) { - if (fcurve_is_changed(but->rnapoin, but->rnaprop, fcu, cfra)) + if (fcurve_is_changed(but->rnapoin, but->rnaprop, fcu, cfra)) { but->drawflag |= UI_BUT_ANIMATED_CHANGED; + } } } else { @@ -196,15 +199,17 @@ bool ui_but_anim_expression_create(uiBut *but, const char *str) /* button must have RNA-pointer to a numeric-capable property */ if (ELEM(NULL, but->rnapoin.data, but->rnaprop)) { - if (G.debug & G_DEBUG) + if (G.debug & G_DEBUG) { printf("ERROR: create expression failed - button has no RNA info attached\n"); + } return false; } if (RNA_property_array_check(but->rnaprop) != 0) { if (but->rnaindex == -1) { - if (G.debug & G_DEBUG) + if (G.debug & G_DEBUG) { printf("ERROR: create expression failed - can't create expression for entire array\n"); + } return false; } } @@ -214,8 +219,9 @@ bool ui_but_anim_expression_create(uiBut *but, const char *str) * don't allow drivers to be created for them */ id = (ID *)but->rnapoin.id.data; if ((id == NULL) || (GS(id->name) == ID_MA) || (GS(id->name) == ID_TE)) { - if (G.debug & G_DEBUG) + if (G.debug & G_DEBUG) { printf("ERROR: create expression failed - invalid data-block for adding drivers (%p)\n", id); + } return false; } @@ -262,8 +268,9 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) fcu = ui_but_get_fcurve(but, NULL, &action, &driven, &special); - if (fcu == NULL) + if (fcu == NULL) { return; + } if (special) { /* NLA Strip property */ -- cgit v1.2.3