diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-07-09 05:04:42 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-07-09 05:04:42 +0400 |
commit | 518911e78c2ae4511cbb9261c5cca410c0a77d73 (patch) | |
tree | 432f6c48fa99ebd19db9ea7df9e56846cf44ccbe /source/blender/editors/interface | |
parent | 5f5ddb00146884d28414811bc92311af56d55904 (diff) |
NLA SoC: Assorted cleanups
* Some cleanups aimed at giving some (neglible) speedups
* Preparation for NLA-Strip keyframes to be editable
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_anim.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index be4087de525..7c439f408ba 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -30,12 +30,15 @@ void ui_but_anim_flag(uiBut *but, float cfra) { but->flag &= ~(UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN); - - if(but->rnaprop && but->rnapoin.id.data) { + + /* there must be some RNA-pointer + property combo for this button */ + if (but->rnaprop && but->rnapoin.id.data && + RNA_property_animateable(&but->rnapoin, but->rnaprop)) + { AnimData *adt= BKE_animdata_from_id(but->rnapoin.id.data); FCurve *fcu; char *path; - + if (adt) { if ((adt->action && adt->action->curves.first) || (adt->drivers.first)) { /* XXX this function call can become a performance bottleneck */ @@ -113,7 +116,6 @@ void ui_but_anim_remove_driver(bContext *C) WM_operator_name_call(C, "ANIM_OT_remove_driver_button", WM_OP_INVOKE_DEFAULT, NULL); } -// TODO: refine the logic for adding/removing drivers... void ui_but_anim_menu(bContext *C, uiBut *but) { uiPopupMenu *pup; |