diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-04-10 17:08:12 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-04-10 17:08:12 +0400 |
commit | 6593bbaca2ceb248426c55e14ceb21bb46553fd1 (patch) | |
tree | 9e778b12484bd6d03c349bcebae4219076c7d09a /source/blender/editors/interface/interface_handlers.c | |
parent | be8b7ead51a5efb5dbd762075ee52812465ba8d6 (diff) |
2.5 - Groundwork for Adding/Removing Drivers
Drivers can now be Added/Removed from buttons using the D/Alt-D hotkeys, and also through the menu. Driver settings (i.e. the target) are not set by default. To set those, go to the Graph Editor (see notes).
Notes:
* Buildsystem maintainers - I've added a new file "editors/animation/drivers.c"
* Widget colours for the driven-setting indications are needed
* To see the new drivers, go into Graph Editor -> "Drivers" mode. Currently, there's a little bug there which prevents editing of the new drivers.
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 6fc0ad37ee3..b41fe7b9b7d 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2610,6 +2610,17 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event) return WM_UI_HANDLER_BREAK; } + /* handle driver adding */ + else if(event->type == DKEY && event->val == KM_PRESS) { + if(event->alt) + ui_but_anim_remove_driver(C); + else + ui_but_anim_add_driver(C); + + ED_region_tag_redraw(CTX_wm_region(C)); + + return WM_UI_HANDLER_BREAK; + } /* handle menu */ else if(event->type == RIGHTMOUSE && event->val == KM_PRESS) { ui_but_anim_menu(C, but); |