From: Good Guy Date: Sun, 17 Feb 2019 21:24:19 +0000 (-0700) Subject: ripple edge drag_handle tweaks, sync_parameter fix, shuttlerc, shortcuts X-Git-Tag: 2019-08~100 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=b4184445f396e16260ed90e645a280149aeda8c0;p=goodguy%2Fcinelerra.git ripple edge drag_handle tweaks, sync_parameter fix, shuttlerc, shortcuts --- diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index 8cf01844..02ed52d3 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -668,14 +668,17 @@ void CWindowGUI::keyboard_zoomout() // } } -void CWindowGUI::sync_parameters(int change_type, int tool, int overlay) +void CWindowGUI::sync_parameters(int change_type, int redraw, int overlay) { - if( tool ) update_tool(); + if( redraw ) { + update_tool(); + canvas->draw_refresh(); + } if( change_type < 0 && !overlay ) return; unlock_window(); if( change_type >= 0 ) { mwindow->restart_brender(); - mwindow->sync_parameters(CHANGE_PARAMS); + mwindow->sync_parameters(change_type); } if( overlay ) { mwindow->gui->lock_window("CWindow::camera_keyframe"); diff --git a/cinelerra-5.1/cinelerra/cwindowgui.h b/cinelerra-5.1/cinelerra/cwindowgui.h index 01ff0ceb..67859a29 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.h +++ b/cinelerra-5.1/cinelerra/cwindowgui.h @@ -86,7 +86,7 @@ public: void keyboard_zoomout(); void update_meters(); void stop_transport(const char *lock_msg); - void sync_parameters(int change_type, int tool=0, int overlay=0); + void sync_parameters(int change_type, int redraw=0, int overlay=0); MWindow *mwindow; CWindow *cwindow; diff --git a/cinelerra-5.1/cinelerra/edit.C b/cinelerra-5.1/cinelerra/edit.C index 2c8eefcf..5321209a 100644 --- a/cinelerra-5.1/cinelerra/edit.C +++ b/cinelerra-5.1/cinelerra/edit.C @@ -451,9 +451,10 @@ int Edit::shift_start(int edit_mode, int64_t newposition, int64_t oldposition, switch( edit_mode ) { case MOVE_RIPPLE: edits_moved = rest_moved = 1; - if( prev ) prev->trim(cut_length); - for( Edit *edit=this; edit; edit=edit->next ) - edit->startproject += cut_length; + startsource += cut_length; + length -= cut_length; + for( Edit *edit=next; edit; edit=edit->next ) + edit->startproject -= cut_length; break; case MOVE_ROLL: if( prev ) prev->trim(cut_length); @@ -500,6 +501,7 @@ int Edit::shift_end(int edit_mode, int64_t newposition, int64_t oldposition, switch( edit_mode ) { case MOVE_RIPPLE: + case MOVE_EDGE: rest_moved = 1; length += cut_length; for( Edit *edit=next; edit; edit=edit->next ) @@ -527,12 +529,6 @@ int Edit::shift_end(int edit_mode, int64_t newposition, int64_t oldposition, next->trim(-cut_length); } break; - case MOVE_EDGE: - edits_moved = 1; - if( prev ) prev->trim(cut_length); - startproject += cut_length; - length -= cut_length; - break; } trim(0); diff --git a/cinelerra-5.1/cinelerra/trackcanvas.C b/cinelerra-5.1/cinelerra/trackcanvas.C index 4b1c2364..bc344756 100644 --- a/cinelerra-5.1/cinelerra/trackcanvas.C +++ b/cinelerra-5.1/cinelerra/trackcanvas.C @@ -3817,23 +3817,28 @@ void TrackCanvas::update_drag_handle() !session->drag_edit ? 0 : session->drag_edit->group_id); double position = -1; + int show_edge = !session->drag_handle ? 1 : 2; switch( handle_mode ) { case MOVE_RIPPLE: + case MOVE_EDGE: + position = session->drag_handle ? + session->drag_position : session->drag_start; + show_edge = 3 - show_edge; + break; case MOVE_ROLL: case MOVE_SLIDE: position = session->drag_position; break; case MOVE_SLIP: - case MOVE_EDGE: position = session->drag_start; + show_edge = 3 - show_edge; break; } if( position < 0 ) position = 0; Track *track = session->drag_handle_track(); int64_t pos = track->to_units(position, 0); - render_handle_frame(edl, pos, shift_down() ? 0 : - session->drag_handle ? 1 : 2); + render_handle_frame(edl, pos, shift_down() ? 0 : show_edge); edl->remove_user(); } } @@ -3857,8 +3862,6 @@ int TrackCanvas::render_handle_frame(EDL *edl, int64_t pos, int mode) CICache *video_cache = new CICache(preferences); render_engine->set_vcache(video_cache); render_engine->arm_command(&command); - int64_t left = pos-1; - if( left < 0 ) left = 0; VRender *vrender = render_engine->vrender; result = vrender && !vrender->process_buffer(&vlt, left, 0) && @@ -3884,12 +3887,12 @@ int TrackCanvas::render_handle_frame(EDL *edl, int64_t pos, int mode) Track *track = mwindow->session->drag_handle_track(); double position = track->from_units(mode == 1 ? left : pos); if( position < 0 ) position = 0; - edl->local_session->set_selectionstart(position); - edl->local_session->set_selectionend(position); PlaybackEngine *playback_engine = mwindow->cwindow->playback_engine; if( playback_engine->is_playing_back ) playback_engine->stop_playback(1); - mwindow->cwindow->playback_engine->refresh_frame(CHANGE_NONE, edl, 0); + edl->local_session->set_selectionstart(position); + edl->local_session->set_selectionend(position); + mwindow->cwindow->playback_engine->refresh_frame(CHANGE_EDL, edl, 0); break; } } return result; diff --git a/cinelerra-5.1/doc/shortcuts.html b/cinelerra-5.1/doc/shortcuts.html index b0e0ce98..b6367342 100644 --- a/cinelerra-5.1/doc/shortcuts.html +++ b/cinelerra-5.1/doc/shortcuts.html @@ -1884,6 +1884,30 @@
Reset projector + +
+ F1 + 'Ctrl+Shift' + Use window layout #1 + + +
+ F2 + 'Ctrl+Shift' + Use window layout #2 + + +
+ F3 + 'Ctrl+Shift' + Use window layout #3 + + +
+ F4 + 'Ctrl+Shift' + Use window layout #4 +

@@ -2220,6 +2244,36 @@
Brings up fullscreen/zoom/close menu + +
+ F1 + 'Ctrl+Shift' + Use window layout #1 + + +
+ F2 + 'Ctrl+Shift' + Use window layout #2 + + +
+ F3 + 'Ctrl+Shift' + Use window layout #3 + + +
+ F4 + 'Ctrl+Shift' + Use window layout #4 + + +
+
+
+
+ Timebar Key @@ -2610,11 +2664,35 @@ 'Ctrl+Shift' Resources/plugin delete from disk + OK + +
+ F1 + 'Ctrl+Shift' + Use window layout #1 + -
-
-
-
+
+ F2 + 'Ctrl+Shift' + Use window layout #2 + + +
+ F3 + 'Ctrl+Shift' + Use window layout #3 + + +
+ F4 + 'Ctrl+Shift' + Use window layout #4 + + +
+
+
+
Overlays Wnd diff --git a/cinelerra-5.1/shuttlerc b/cinelerra-5.1/shuttlerc index 9091c5dd..dd4356e4 100644 --- a/cinelerra-5.1/shuttlerc +++ b/cinelerra-5.1/shuttlerc @@ -1,7 +1,7 @@ # uncomment to enable diagnostics #DEBUG -# recommend uncommenting USB_DIRECT and avoid problems +# recommend uncommenting USB_DIRECT for full functionality #USB_DIRECT # redefine default, use @@ -33,10 +33,10 @@ K14 "[" # Toggle in K15 "]" # Toggle out - K1 "i" # Clip - K2 "x" # Cut - K3 "c" # Copy - K4 "v" # Paste + K1 "l" # Label + K2 XK_Button_1 + K3 XK_Button_3 + K4 "i" # Clip S-7 REV_16 # Next 6 are reverse keys S-6 REV_8 # the number on the end represents speed @@ -44,9 +44,11 @@ S-4 REV_2 # 2 means 2x or double speed S-3 REV_1 S-2 REV_0.5 # note 0.5 represents 1/2 speed - S-1 XK_KP_0 # Because the Shuttle does not generate S0, have to use S1 - S0 XK_KP_0 # Hardware does not generate S0 - S1 XK_KP_0 # Because the Shuttle does not generate S0, have to use S1 +#S-1 REV_0.25 # if using usb_direct + S-1 XK_KP_0 + S0 XK_KP_0 # hid_generic kernel driver does not generate s0 + S1 XK_KP_0 +#S1 FWD_0.25 # if using usb_direct S2 FWD_0.5 # Next 6 are forward keys S3 FWD_1 S4 FWD_2 @@ -73,10 +75,10 @@ K14 "[" # Toggle in K15 "]" # Toggle out - K1 "i" # Clip - K2 "x" # Cut - K3 "c" # Copy - K4 "v" # Paste + K1 "l" # Label + K2 XK_Button_1 + K3 XK_Button_3 + K4 "i" # Clip S-7 REV_16 S-6 REV_8 @@ -84,9 +86,11 @@ S-4 REV_2 S-3 REV_1 S-2 REV_0.5 - S-1 XK_KP_0 # Because the Shuttle does not generate S0, have to use S1 - S0 XK_KP_0 # Hardware does not generate S0 - S1 XK_KP_0 # Because the Shuttle does not generate S0, have to use S1 +#S-1 REV_0.25 # if using usb_direct + S-1 XK_KP_0 + S0 XK_KP_0 # hid_generic kernel driver does not generate s0 + S1 XK_KP_0 +#S1 FWD_0.25 # if using usb_direct S2 FWD_0.5 S3 FWD_1 S4 FWD_2 @@ -106,17 +110,18 @@ K8 XK_KP_3 # Play, or if playing Stop K9 XK_End # End - K10 Shift-Ctrl-XK_KP_3 # Loop play between In and Out pointers - K11 "l" # Add label at position + K10 XK_Button_1 + K11 XK_Button_3 + K12 Ctrl-XK_Left # Go to previous label K13 Ctrl-XK_Right # Go to next label K14 "[" # Toggle in K15 "]" # Toggle out - K1 "i" # Clip - K2 "v" # Splice - K3 "c" # Copy - K4 "b" # Overwrite + K1 "l" # Label + K2 XK_Button_1 + K3 XK_Button_3 + K4 "i" # Clip S-7 REV_16 S-6 REV_8 @@ -124,9 +129,11 @@ S-4 REV_2 S-3 REV_1 S-2 REV_0.5 - S-1 XK_KP_0 # Because the Shuttle does not generate S0, have to use S1 - S0 XK_KP_0 # Hardware does not generate S0 - S1 XK_KP_0 # Because the Shuttle does not generate S0, have to use S1 +#S-1 REV_0.25 # if using usb_direct + S-1 XK_KP_0 + S0 XK_KP_0 # hid_generic kernel driver does not generate s0 + S1 XK_KP_0 +#S1 FWD_0.25 # if using usb_direct S2 FWD_0.5 S3 FWD_1 S4 FWD_2