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>2019-03-25 02:15:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-25 03:16:46 +0300
commite86e0aad55675a5c4473d0538146dbccda7613e8 (patch)
treef20540ba9e01cc8d7e13090df8fbf9691cb8b01b /source/blender/editors/interface/interface_anim.c
parent72ede30d0f970fe7d6774ce0851e3aacc82e23d8 (diff)
Cleanup: use braces for interface code
Diffstat (limited to 'source/blender/editors/interface/interface_anim.c')
-rw-r--r--source/blender/editors/interface/interface_anim.c21
1 files changed, 14 insertions, 7 deletions
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 */