diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-11-17 13:12:35 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-11-17 13:12:35 +0300 |
commit | 10e1780cf9dc038f289539877790d12645c0bfda (patch) | |
tree | 4be6fa8cd2ed40aed8b11f17fca2b71e9e9063cc /source | |
parent | b1a6ef4bfc1275c9b06adca9cee125a2d3fa8df9 (diff) |
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.
Diffstat (limited to 'source')
7 files changed, 27 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 54836349e5e..81630faccd1 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -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 diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 33eed1ff2a4..0f9b2939260 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -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; } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 6adee174400..a84a393b3ae 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -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); - - } diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 88be1d61ff6..80c1ed2fe95 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -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); diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index 79c8446b440..65a580d60f7 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.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_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); } diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index ed532edb0ec..7e1fdc80bb3 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -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); diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index af1b8f56c66..97601a8e65f 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -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"); |