Ack... committed wrong file before (fortunately it was just a harmless comment added)
authorJoshua Leung <aligorith@gmail.com>
Fri, 21 Aug 2009 11:22:38 +0000 (11:22 +0000)
committerJoshua Leung <aligorith@gmail.com>
Fri, 21 Aug 2009 11:22:38 +0000 (11:22 +0000)
source/blender/editors/space_view3d/space_view3d.c

index 8b719dd2d809feffec12fea03e82ef9e214676ad..3dd65a6f796dbd84bbe9125b0b4b71d81f50018c 100644 (file)
@@ -280,7 +280,7 @@ static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype)
        
        /* copy last mode, then we can re-init the region maps */
        rv3d->lastmode= stype;
-
+       
        keymap= WM_keymap_listbase(wm, "Object Mode", 0, 0);
        if(ELEM(stype, 0, NS_MODE_OBJECT))
                WM_event_add_keymap_handler(&ar->handlers, keymap);
@@ -304,6 +304,12 @@ static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype)
                WM_event_add_keymap_handler(&ar->handlers, keymap);
        else
                WM_event_remove_keymap_handler(&ar->handlers, keymap);
+               
+       keymap= WM_keymap_listbase(wm, "Pose", 0, 0);
+       if(stype==NS_MODE_POSE)
+               WM_event_add_keymap_handler(&ar->handlers, keymap);
+       else
+               WM_event_remove_keymap_handler(&ar->handlers, keymap);
 
        keymap= WM_keymap_listbase(wm, "Metaball", 0, 0);
        if(stype==NS_EDITMODE_MBALL)
@@ -319,7 +325,7 @@ static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype)
 
        /* armature sketching needs to take over mouse */
        keymap= WM_keymap_listbase(wm, "Armature_Sketch", 0, 0);
-       if(stype==NS_EDITMODE_TEXT)
+       if(stype==NS_EDITMODE_ARMATURE)
                WM_event_add_keymap_handler_priority(&ar->handlers, keymap, 10);
        else
                WM_event_remove_keymap_handler(&ar->handlers, keymap);