Assorted bugfixes - Sequencer/Preview Range:
authorJoshua Leung <aligorith@gmail.com>
Tue, 17 Nov 2009 10:12:35 +0000 (10:12 +0000)
committerJoshua Leung <aligorith@gmail.com>
Tue, 17 Nov 2009 10:12:35 +0000 (10:12 +0000)
* Snapping strips now works with the hotkey  Shift-S   as in the rest of Blender
* Preview Range works in Sequencer now (the operators for setting, clearing, and also drawing)
* Related to the Preview Range for Sequencer, toggling the time-display mode also works
* Preview Range Set operator now works again, after the modal keymaps change for borderselect broke it. Also sends correct notifiers now after bein called.

source/blender/blenkernel/intern/armature.c
source/blender/editors/animation/anim_ops.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_ops.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/windowmanager/intern/wm_operators.c

index 54836349e5e41cfaf4b837e1fc13723d14151d12..81630faccd12a13549ebe28e6862995bb8278288 100644 (file)
@@ -1907,7 +1907,7 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
                /* construct rotation matrix from the axis-angle rotation found above 
                 *      - this call takes care to make sure that the axis provided is a unit vector first
                 */
-               axis_angle_to_mat3( dmat,raxis, rangle);
+               axis_angle_to_mat3(dmat, raxis, rangle);
                
                /* combine these rotations so that the y-axis of the bone is now aligned as the spline dictates,
                 * while still maintaining roll control from the existing bone animation
index 33eed1ff2a47eb128477db4d379d51e633f02466..0f9b29392607d27acd7bc1e12cc0b0728829e913 100644 (file)
@@ -260,6 +260,9 @@ static int previewrange_define_exec(bContext *C, wmOperator *op)
        scene->r.psfra= (int)floor(sfra + 0.5f);
        scene->r.pefra= (int)floor(efra + 0.5f);
        
+       /* send notifiers */
+       WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+       
        return OPERATOR_FINISHED;
 } 
 
index 6adee174400976bee6b7dd797d08f44560a334ce..a84a393b3aeb904c2003b23d45389669fc11192d 100644 (file)
@@ -3403,7 +3403,8 @@ static int ui_but_menu(bContext *C, uiBut *but)
        if(but->rnapoin.data && but->rnaprop) {
 
                length= RNA_property_array_length(&but->rnapoin, but->rnaprop);
-
+               
+               /* Keyframes */
                if(but->flag & UI_BUT_ANIMATED_KEY) {
                        if(length) {
                                uiItemBooleanO(layout, "Replace Keyframes", 0, "ANIM_OT_insert_keyframe_button", "all", 1);
@@ -3425,7 +3426,8 @@ static int ui_but_menu(bContext *C, uiBut *but)
                        else
                                uiItemBooleanO(layout, "Insert Keyframe", 0, "ANIM_OT_insert_keyframe_button", "all", 0);
                }
-
+               
+               /* Drivers */
                if(but->flag & UI_BUT_DRIVEN) {
                        uiItemS(layout);
 
@@ -3454,7 +3456,8 @@ static int ui_but_menu(bContext *C, uiBut *but)
                        if (ANIM_driver_can_paste())
                                uiItemO(layout, "Paste Driver", 0, "ANIM_OT_paste_driver_button");
                }
-
+               
+               /* Keying Sets */
                if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) {
                        uiItemS(layout);
 
@@ -3468,14 +3471,19 @@ static int ui_but_menu(bContext *C, uiBut *but)
                                uiItemO(layout, "Remove from Keying Set", 0, "ANIM_OT_remove_keyingset_button");
                        }
                }
-
+               
                uiItemS(layout);
-
+               
+               /* Property Operators */
+               
+               //Copy Property Value
+               //Paste Property Value
+               
+               //uiItemO(layout, "Reset to Default Value", 0, "WM_OT_property_value_reset_button");
+               
                uiItemO(layout, "Copy Data Path", 0, "ANIM_OT_copy_clipboard_button");
 
                uiItemS(layout);
-
-
        }
 
 
index 88be1d61ff622cf909e2e4863d474a1c1fe8d673..80c1ed2fe95aa9de0e1a1e08deac3cadf71a671a 100644 (file)
@@ -978,6 +978,10 @@ void drawseqspace(const bContext *C, ARegion *ar)
        /* Draw markers */
 //     draw_markers_timespace(SCE_MARKERS, DRAW_MARKERS_LINES);
        
+       /* preview range */
+       UI_view2d_view_ortho(C, v2d);
+       ANIM_draw_previewrange(C, v2d);
+       
        /* reset view matrix */
        UI_view2d_view_restore(C);
 
index 79c8446b44004b0d347f30c7c291306643d5ead8..65a580d60f7e8369463fb7abfb1ecbd414eea838 100644 (file)
@@ -153,6 +153,8 @@ void sequencer_keymap(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "SEQUENCER_OT_swap_left", LEFTARROWKEY, KM_PRESS, KM_ALT, 0);
        WM_keymap_add_item(keymap, "SEQUENCER_OT_swap_right", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0);
        
+       WM_keymap_add_item(keymap, "SEQUENCER_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
+       
 
        /* Mouse selection, a bit verbose :/ */
        WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
@@ -212,8 +214,6 @@ void sequencer_keymap(wmKeyConfig *keyconf)
        kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", AKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_string_set(kmi->ptr, "name", "SEQUENCER_MT_add");
        
-       WM_keymap_verify_item(keymap, "ANIM_OT_change_frame", ACTIONMOUSE, KM_PRESS, 0, 0);
-
        transform_keymap_for_space(keyconf, keymap, SPACE_SEQ);
 }
 
index ed532edb0ec78588c589d99aa713baf19890b736..7e1fdc80bb33480a7d2cb07f6fb3aae154dcddbd 100644 (file)
@@ -283,7 +283,7 @@ void ED_spacetype_sequencer(void)
        art->init= sequencer_main_area_init;
        art->draw= drawseqspace;
        art->listener= sequencer_main_area_listener;
-       art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES;
+       art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_ANIMATION;
 
        BLI_addhead(&st->regiontypes, art);
        
index af1b8f56c66d90ea9b68d929d5c0902d902d2c06..97601a8e65f3d44bd14adc9844407b45f5706f10 100644 (file)
@@ -2474,6 +2474,7 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf)
 
        /* assign map to operators */
        WM_modalkeymap_assign(keymap, "ANIM_OT_channels_select_border");
+       WM_modalkeymap_assign(keymap, "ANIM_OT_previewrange_set");
        WM_modalkeymap_assign(keymap, "MARKER_OT_select_border");
 //     WM_modalkeymap_assign(keymap, "SCREEN_OT_border_select"); // template
        WM_modalkeymap_assign(keymap, "ACT_OT_select_border");