2.5 - Warning Fixes + Hotkey for Reversed Playback
authorJoshua Leung <aligorith@gmail.com>
Sun, 19 Jul 2009 05:20:30 +0000 (05:20 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sun, 19 Jul 2009 05:20:30 +0000 (05:20 +0000)
Reversed playback can now be activated using the Alt-Shift-A hotkey. It works the same way that the Alt-A playback operator works.

source/blender/editors/armature/poselib.c
source/blender/editors/object/editconstraint.c
source/blender/editors/screen/screen_ops.c

index d0a99e4ad133f3ce63d2df6f2243e013eff2506e..ef2e5188487b8cdb19b098507b107e33635265db 100644 (file)
@@ -270,7 +270,7 @@ void poselib_validate_act (bAction *act)
        }
        
        /* free temp memory */
-       BLI_freelistN(&keys);
+       BLI_freelistN((ListBase *)&keys);
        
        BIF_undo_push("PoseLib Validate Action");
 }
index 62bc5d132577e736e662955569a637ac996a6673..f5feccb8e4c4df58245f670b7ae3a969e00a5345 100644 (file)
@@ -1091,7 +1091,7 @@ static int pose_constraint_add_exec(bContext *C, wmOperator *op)
        Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
 
        if(!ob)
-               return OPERATOR_CANCELLED;;
+               return OPERATOR_CANCELLED;
        
        return constraint_add_exec(C, op, get_active_constraints(ob));
 }
index 812c9f1106957cc2890d4998f6f95a053c2da933..05f5d847159835e78f079fdbb1e86d41babb0ef2 100644 (file)
@@ -2880,7 +2880,10 @@ void ED_operatortypes_screen(void)
 /* called in spacetypes.c */
 void ED_keymap_screen(wmWindowManager *wm)
 {
-       ListBase *keymap= WM_keymap_listbase(wm, "Screen", 0, 0);
+       ListBase *keymap;
+       
+       /* Screen General ------------------------------------------------ */
+       keymap= WM_keymap_listbase(wm, "Screen", 0, 0);
        
        /* standard timers */
        WM_keymap_add_item(keymap, "SCREEN_OT_animation_step", TIMER0, KM_ANY, KM_ANY, 0);
@@ -2933,13 +2936,17 @@ void ED_keymap_screen(wmWindowManager *wm)
        WM_keymap_add_item(keymap, "SCREEN_OT_render_view_cancel", ESCKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "SCREEN_OT_render_view_show", F11KEY, KM_PRESS, 0, 0);
        
-       /* frame offsets & play */
+       /* Anim Playback ------------------------------------------------ */
        keymap= WM_keymap_listbase(wm, "Frames", 0, 0);
+       
+       /* frame offsets */
        RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", UPARROWKEY, KM_PRESS, 0, 0)->ptr, "delta", 10);
        RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", DOWNARROWKEY, KM_PRESS, 0, 0)->ptr, "delta", -10);
        RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", LEFTARROWKEY, KM_PRESS, 0, 0)->ptr, "delta", -1);
        RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", RIGHTARROWKEY, KM_PRESS, 0, 0)->ptr, "delta", 1);
-       WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT, 0);
        
+       /* play (forward and backwards) */
+       WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT, 0);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "reverse", 1);
 }