Keying Sets: Added options to add/remove properties from the active Keying Set to...
[blender.git] / source / blender / editors / interface / interface_handlers.c
index 79c707f553553b2cce00aa3f116ab03d2f2618ee..259ccba6b89a23f6fa1d3063ba2b31811762ceb8 100644 (file)
@@ -3265,18 +3265,18 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
                        ui_but_copy_paste(C, but, data, (event->type == CKEY)? 'c': 'v');
                        return WM_UI_HANDLER_BREAK;
                }
-               /* handle keyframeing */
+               /* handle keyframing */
                else if(event->type == IKEY && event->val == KM_PRESS) {
                        if(event->alt)
                                ui_but_anim_delete_keyframe(C);
                        else
                                ui_but_anim_insert_keyframe(C);
-
+                       
                        ED_region_tag_redraw(CTX_wm_region(C));
-
+                       
                        return WM_UI_HANDLER_BREAK;
                }
-               /* handle driver adding */
+               /* handle drivers */
                else if(event->type == DKEY && event->val == KM_PRESS) {
                        if(event->alt)
                                ui_but_anim_remove_driver(C);
@@ -3287,6 +3287,17 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
                        
                        return WM_UI_HANDLER_BREAK;
                }
+               /* handle keyingsets */
+               else if(event->type == KKEY && event->val == KM_PRESS) {
+                       if(event->alt)
+                               ui_but_anim_remove_keyingset(C);
+                       else
+                               ui_but_anim_remove_keyingset(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) {
                        /* RMB has two options now */