ripple edge drag_handle tweaks, sync_parameter fix, shuttlerc, shortcuts
authorGood Guy <[email protected]>
Sun, 17 Feb 2019 21:24:19 +0000 (14:24 -0700)
committerGood Guy <[email protected]>
Sun, 17 Feb 2019 21:24:19 +0000 (14:24 -0700)
cinelerra-5.1/cinelerra/cwindowgui.C
cinelerra-5.1/cinelerra/cwindowgui.h
cinelerra-5.1/cinelerra/edit.C
cinelerra-5.1/cinelerra/trackcanvas.C
cinelerra-5.1/doc/shortcuts.html
cinelerra-5.1/shuttlerc

index 8cf018446e68c13b330edcd77ff78b673522d561..02ed52d32ad93ae559acb39554362dd0ce85e5d1 100644 (file)
@@ -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");
index 01ff0cebdbfc69d451a9dd74c9513fe1be75e45b..67859a2967a04835db67812e64f0148529f55cfe 100644 (file)
@@ -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;
index 2c8eefcfbb0698a8b56553ed3190059cd92efac0..5321209acd68b7233a3b23d2ac1bb4da9edcadfe 100644 (file)
@@ -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);
 
index 4b1c2364397f64c68f72b14b5d0b9c93c1dc9981..bc34475653aef2daed0a3e791f1fdd2df24097d6 100644 (file)
@@ -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;
index b0e0ce989e37883a7d045c0c57d1df832e16f0a7..b636734229aae6a9e70cc5013f1487027cd1bf24 100644 (file)
                <td align="left"><font face="Liberation Serif" size=4><br></font></td>
                <td align="left"><font face="Liberation Serif" size=4>Reset projector</font></td>
        </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>F1</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Use window layout #1</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>F2</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Use window layout #2</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>F3</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Use window layout #3</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>F4</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Use window layout #4</font></td>
+       </tr>
        <tr>
                <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
                <td align="left"><font face="Liberation Serif" size=4><br></font></td>
                <td align="left"><font face="Liberation Serif" size=4><br></font></td>
                <td align="left"><font face="Liberation Serif" size=4>Brings up fullscreen/zoom/close menu</font></td>
        </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>F1</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Use window layout #1</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>F2</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Use window layout #2</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>F3</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Use window layout #3</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>F4</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Use window layout #4</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4><br></font></td>
+       </tr>
        <tr>
                <td height="26" align="left"><b><font face="Liberation Serif" size=4> Timebar</b></font></td>
                <td align="left"><b><u><font face="Liberation Serif" size=4>Key</font></u></b></td>
                <td align="left"><font face="Liberation Serif,Times New Roman" size=4>'Ctrl+Shift'</font></td>
                <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Resources/plugin delete from disk + OK</font></td>
        </tr>
+
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>F1</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Use window layout #1</font></td>
+       </tr>
        <tr>
-               <td height="26" align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
-               <td align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
-               <td align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
-               <td align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>F2</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Use window layout #2</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>F3</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Use window layout #3</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>F4</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Use window layout #4</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4><br></font></td>
        </tr>
        <tr>
                <td height="26" align="left"><b><font face="Liberation Serif,Times New Roman" size=4>Overlays Wnd</font></b></td>
index 9091c5ddbe56d4ab551e2a1fea73b0cbc5264e61..dd4356e4a4d8a0d4b63e2c88656f30deadce315f 100644 (file)
@@ -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
  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
  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
  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
  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
  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
  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