ui_but_anim_expression_create was never returning true, even when it succeeded.

This commit is contained in:
Campbell Barton
2013-01-31 21:56:14 +00:00
parent a9015e3f7d
commit 2007d57fdc

View File

@@ -135,8 +135,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str)
ID *id; ID *id;
FCurve *fcu; FCurve *fcu;
char *path; char *path;
int rnaindex; bool ok = false;
short ok = 0;
/* button must have RNA-pointer to a numeric-capable property */ /* button must have RNA-pointer to a numeric-capable property */
if (ELEM(NULL, but->rnapoin.data, but->rnaprop)) { if (ELEM(NULL, but->rnapoin.data, but->rnaprop)) {
@@ -181,6 +180,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str)
/* updates */ /* updates */
driver->flag |= DRIVER_FLAG_RECOMPILE; 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);
ok = true;
} }
} }