diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-09-25 18:32:26 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-09-25 18:32:26 +0400 |
commit | 58082beda937b05cb2aa42e4f9f0b801a3e8663d (patch) | |
tree | 0d396166631478123871c7cbdcbd6d20db0c7c81 /source/blender/editors/interface/interface_anim.c | |
parent | cd429bdb505d7ef05503bd1b60960df8f9b849a1 (diff) |
Fix #23847: keyframe insert on button not working in popup menus, e.g.
the vector popup for node inputs.
Diffstat (limited to 'source/blender/editors/interface/interface_anim.c')
-rw-r--r-- | source/blender/editors/interface/interface_anim.c | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 0e4de9fabaa..2a30a36ffe0 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -114,74 +114,50 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) } } -void uiAnimContextProperty(const bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index) -{ - ARegion *ar= CTX_wm_region(C); - uiBlock *block; - uiBut *but; - - memset(ptr, 0, sizeof(*ptr)); - *prop= NULL; - *index= 0; - - if(ar) { - for(block=ar->uiblocks.first; block; block=block->next) { - for(but=block->buttons.first; but; but= but->next) { - if((but->active || but->flag & UI_BUT_LAST_ACTIVE) && but->rnapoin.data) { - *ptr= but->rnapoin; - *prop= but->rnaprop; - *index= but->rnaindex; - return; - } - } - } - } -} - void ui_but_anim_insert_keyframe(bContext *C) { - /* this operator calls uiAnimContextProperty above */ + /* this operator calls uiContextActiveProperty */ WM_operator_name_call(C, "ANIM_OT_keyframe_insert_button", WM_OP_INVOKE_DEFAULT, NULL); } void ui_but_anim_delete_keyframe(bContext *C) { - /* this operator calls uiAnimContextProperty above */ + /* this operator calls uiContextActiveProperty */ WM_operator_name_call(C, "ANIM_OT_keyframe_delete_button", WM_OP_INVOKE_DEFAULT, NULL); } void ui_but_anim_add_driver(bContext *C) { - /* this operator calls uiAnimContextProperty above */ + /* this operator calls uiContextActiveProperty */ WM_operator_name_call(C, "ANIM_OT_driver_button_add", WM_OP_INVOKE_DEFAULT, NULL); } void ui_but_anim_remove_driver(bContext *C) { - /* this operator calls uiAnimContextProperty above */ + /* this operator calls uiContextActiveProperty */ WM_operator_name_call(C, "ANIM_OT_driver_button_remove", WM_OP_INVOKE_DEFAULT, NULL); } void ui_but_anim_copy_driver(bContext *C) { - /* this operator calls uiAnimContextProperty above */ + /* this operator calls uiContextActiveProperty */ WM_operator_name_call(C, "ANIM_OT_copy_driver_button", WM_OP_INVOKE_DEFAULT, NULL); } void ui_but_anim_paste_driver(bContext *C) { - /* this operator calls uiAnimContextProperty above */ + /* this operator calls uiContextActiveProperty */ WM_operator_name_call(C, "ANIM_OT_paste_driver_button", WM_OP_INVOKE_DEFAULT, NULL); } void ui_but_anim_add_keyingset(bContext *C) { - /* this operator calls uiAnimContextProperty above */ + /* this operator calls uiContextActiveProperty */ WM_operator_name_call(C, "ANIM_OT_keyingset_button_add", WM_OP_INVOKE_DEFAULT, NULL); } void ui_but_anim_remove_keyingset(bContext *C) { - /* this operator calls uiAnimContextProperty above */ + /* this operator calls uiContextActiveProperty */ WM_operator_name_call(C, "ANIM_OT_keyingset_button_remove", WM_OP_INVOKE_DEFAULT, NULL); } |