Assorted bugfixes - Sequencer/Preview Range:

* 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.
This commit is contained in:
Joshua Leung 2009-11-17 10:12:35 +00:00
parent b1a6ef4bfc
commit 10e1780cf9
7 changed files with 27 additions and 11 deletions

@ -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 /* 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 * - 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, /* 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 * while still maintaining roll control from the existing bone animation

@ -260,6 +260,9 @@ static int previewrange_define_exec(bContext *C, wmOperator *op)
scene->r.psfra= (int)floor(sfra + 0.5f); scene->r.psfra= (int)floor(sfra + 0.5f);
scene->r.pefra= (int)floor(efra + 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; return OPERATOR_FINISHED;
} }

@ -3404,6 +3404,7 @@ static int ui_but_menu(bContext *C, uiBut *but)
length= RNA_property_array_length(&but->rnapoin, but->rnaprop); length= RNA_property_array_length(&but->rnapoin, but->rnaprop);
/* Keyframes */
if(but->flag & UI_BUT_ANIMATED_KEY) { if(but->flag & UI_BUT_ANIMATED_KEY) {
if(length) { if(length) {
uiItemBooleanO(layout, "Replace Keyframes", 0, "ANIM_OT_insert_keyframe_button", "all", 1); uiItemBooleanO(layout, "Replace Keyframes", 0, "ANIM_OT_insert_keyframe_button", "all", 1);
@ -3426,6 +3427,7 @@ static int ui_but_menu(bContext *C, uiBut *but)
uiItemBooleanO(layout, "Insert Keyframe", 0, "ANIM_OT_insert_keyframe_button", "all", 0); uiItemBooleanO(layout, "Insert Keyframe", 0, "ANIM_OT_insert_keyframe_button", "all", 0);
} }
/* Drivers */
if(but->flag & UI_BUT_DRIVEN) { if(but->flag & UI_BUT_DRIVEN) {
uiItemS(layout); uiItemS(layout);
@ -3455,6 +3457,7 @@ static int ui_but_menu(bContext *C, uiBut *but)
uiItemO(layout, "Paste Driver", 0, "ANIM_OT_paste_driver_button"); uiItemO(layout, "Paste Driver", 0, "ANIM_OT_paste_driver_button");
} }
/* Keying Sets */
if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) { if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) {
uiItemS(layout); uiItemS(layout);
@ -3471,11 +3474,16 @@ static int ui_but_menu(bContext *C, uiBut *but)
uiItemS(layout); 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"); uiItemO(layout, "Copy Data Path", 0, "ANIM_OT_copy_clipboard_button");
uiItemS(layout); uiItemS(layout);
} }

@ -978,6 +978,10 @@ void drawseqspace(const bContext *C, ARegion *ar)
/* Draw markers */ /* Draw markers */
// draw_markers_timespace(SCE_MARKERS, DRAW_MARKERS_LINES); // draw_markers_timespace(SCE_MARKERS, DRAW_MARKERS_LINES);
/* preview range */
UI_view2d_view_ortho(C, v2d);
ANIM_draw_previewrange(C, v2d);
/* reset view matrix */ /* reset view matrix */
UI_view2d_view_restore(C); UI_view2d_view_restore(C);

@ -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_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_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 :/ */ /* Mouse selection, a bit verbose :/ */
WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); 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); 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"); 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); transform_keymap_for_space(keyconf, keymap, SPACE_SEQ);
} }

@ -283,7 +283,7 @@ void ED_spacetype_sequencer(void)
art->init= sequencer_main_area_init; art->init= sequencer_main_area_init;
art->draw= drawseqspace; art->draw= drawseqspace;
art->listener= sequencer_main_area_listener; 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); BLI_addhead(&st->regiontypes, art);

@ -2474,6 +2474,7 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf)
/* assign map to operators */ /* assign map to operators */
WM_modalkeymap_assign(keymap, "ANIM_OT_channels_select_border"); 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, "MARKER_OT_select_border");
// WM_modalkeymap_assign(keymap, "SCREEN_OT_border_select"); // template // WM_modalkeymap_assign(keymap, "SCREEN_OT_border_select"); // template
WM_modalkeymap_assign(keymap, "ACT_OT_select_border"); WM_modalkeymap_assign(keymap, "ACT_OT_select_border");