diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-30 05:51:25 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-30 05:51:25 +0400 |
commit | a6ebffe182e3867b8a365499c7eb990fb277cbe7 (patch) | |
tree | 4bd67917e822a49eb7d939cafd1d6e57a3b6b4f5 /source/blender/editors/interface/interface_anim.c | |
parent | 7b60ebf398757e40006b239d52562874b6b07784 (diff) |
style cleanup: interface
Diffstat (limited to 'source/blender/editors/interface/interface_anim.c')
-rw-r--r-- | source/blender/editors/interface/interface_anim.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 9b48e956468..955d564e111 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -65,9 +65,9 @@ void ui_but_anim_flag(uiBut *but, float cfra) FCurve *fcu; int driven; - but->flag &= ~(UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN); + but->flag &= ~(UI_BUT_ANIMATED | UI_BUT_ANIMATED_KEY | UI_BUT_DRIVEN); - fcu= ui_but_get_fcurve(but, NULL, &driven); + fcu = ui_but_get_fcurve(but, NULL, &driven); if (fcu) { if (!driven) { @@ -88,10 +88,10 @@ int ui_but_anim_expression_get(uiBut *but, char *str, size_t maxlen) ChannelDriver *driver; int driven; - fcu= ui_but_get_fcurve(but, NULL, &driven); + fcu = ui_but_get_fcurve(but, NULL, &driven); if (fcu && driven) { - driver= fcu->driver; + driver = fcu->driver; if (driver && driver->type == DRIVER_TYPE_PYTHON) { BLI_strncpy(str, driver->expression, maxlen); @@ -108,15 +108,15 @@ int ui_but_anim_expression_set(uiBut *but, const char *str) ChannelDriver *driver; int driven; - fcu= ui_but_get_fcurve(but, NULL, &driven); + fcu = ui_but_get_fcurve(but, NULL, &driven); if (fcu && driven) { - driver= fcu->driver; + driver = fcu->driver; if (driver && driver->type == DRIVER_TYPE_PYTHON) { BLI_strncpy_utf8(driver->expression, str, sizeof(driver->expression)); driver->flag |= DRIVER_FLAG_RECOMPILE; - WM_event_add_notifier(but->block->evil_C, NC_ANIMATION|ND_KEYFRAME, NULL); + WM_event_add_notifier(but->block->evil_C, NC_ANIMATION | ND_KEYFRAME, NULL); return 1; } } @@ -131,7 +131,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) ID *id; FCurve *fcu; char *path; - short ok=0; + short ok = 0; /* button must have RNA-pointer to a numeric-capable property */ if (ELEM(NULL, but->rnapoin.data, but->rnaprop)) { @@ -143,7 +143,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) /* make sure we have animdata for this */ // FIXME: until materials can be handled by depsgraph, 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 ((id == NULL) || (GS(id->name) == ID_MA) || (GS(id->name) == ID_TE)) { if (G.f & G_DEBUG) printf("ERROR: create expression failed - invalid id-datablock for adding drivers (%p)\n", id); return 0; @@ -155,7 +155,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) /* create driver */ fcu = verify_driver_fcurve(id, path, but->rnaindex, 1); if (fcu) { - ChannelDriver *driver= fcu->driver; + ChannelDriver *driver = fcu->driver; if (driver) { /* set type of driver */ @@ -167,7 +167,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) /* updates */ driver->flag |= DRIVER_FLAG_RECOMPILE; - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME, NULL); + WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME, NULL); } } @@ -183,10 +183,10 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) FCurve *fcu; int driven; - fcu= ui_but_get_fcurve(but, &action, &driven); + fcu = ui_but_get_fcurve(but, &action, &driven); if (fcu && !driven) { - id= but->rnapoin.id.data; + id = but->rnapoin.id.data; // TODO: this should probably respect the keyingset only option for anim if (autokeyframe_cfra_can_key(scene, id)) { @@ -194,8 +194,8 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) short flag = ANIM_get_keyframing_flags(scene, 1); fcu->flag &= ~FCURVE_SELECTED; - insert_keyframe(reports, id, action, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag); - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); + insert_keyframe(reports, id, action, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag); + WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL); } } } |