add master/armed_gang track operations, tweak appearanceprefs layout, fix vicon video...
authorGood Guy <[email protected]>
Thu, 25 Jun 2020 01:56:50 +0000 (19:56 -0600)
committerGood Guy <[email protected]>
Thu, 25 Jun 2020 01:56:50 +0000 (19:56 -0600)
120 files changed:
cinelerra-5.1/cinelerra/apatchgui.C
cinelerra-5.1/cinelerra/appearanceprefs.C
cinelerra-5.1/cinelerra/appearanceprefs.h
cinelerra-5.1/cinelerra/awindowgui.C
cinelerra-5.1/cinelerra/bdcreate.C
cinelerra-5.1/cinelerra/cwindow.C
cinelerra-5.1/cinelerra/cwindowgui.C
cinelerra-5.1/cinelerra/cwindowgui.h
cinelerra-5.1/cinelerra/cwindowtool.C
cinelerra-5.1/cinelerra/dvdcreate.C
cinelerra-5.1/cinelerra/edit.C
cinelerra-5.1/cinelerra/edit.h
cinelerra-5.1/cinelerra/editlength.C
cinelerra-5.1/cinelerra/editpanel.C
cinelerra-5.1/cinelerra/editpanel.h
cinelerra-5.1/cinelerra/editpanel.inc
cinelerra-5.1/cinelerra/edl.C
cinelerra-5.1/cinelerra/edlsession.C
cinelerra-5.1/cinelerra/edlsession.h
cinelerra-5.1/cinelerra/edlsession.inc
cinelerra-5.1/cinelerra/keyframepopup.C
cinelerra-5.1/cinelerra/mainmenu.C
cinelerra-5.1/cinelerra/mbuttons.C
cinelerra-5.1/cinelerra/mbuttons.h
cinelerra-5.1/cinelerra/mixersalign.C
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/mwindow.h
cinelerra-5.1/cinelerra/mwindowedit.C
cinelerra-5.1/cinelerra/mwindowgui.C
cinelerra-5.1/cinelerra/mwindowmove.C
cinelerra-5.1/cinelerra/patchbay.C
cinelerra-5.1/cinelerra/patchgui.C
cinelerra-5.1/cinelerra/patchgui.h
cinelerra-5.1/cinelerra/plugindialog.C
cinelerra-5.1/cinelerra/recordableatracks.C
cinelerra-5.1/cinelerra/recordablevtracks.C
cinelerra-5.1/cinelerra/swindow.C
cinelerra-5.1/cinelerra/track.C
cinelerra-5.1/cinelerra/track.h
cinelerra-5.1/cinelerra/trackcanvas.C
cinelerra-5.1/cinelerra/tracklist.C
cinelerra-5.1/cinelerra/trackpopup.C
cinelerra-5.1/cinelerra/tracks.C
cinelerra-5.1/cinelerra/tracks.h
cinelerra-5.1/cinelerra/tracksedit.C
cinelerra-5.1/cinelerra/vpatchgui.C
cinelerra-5.1/cinelerra/vwindowgui.C
cinelerra-5.1/cinelerra/vwindowgui.h
cinelerra-5.1/doc/shortcuts.html
cinelerra-5.1/plugins/theme_blond/blondtheme.C
cinelerra-5.1/plugins/theme_blond/data/gang0.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/gang1.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/gang2.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/masterpatch.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/patchbay_bg.png
cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C
cinelerra-5.1/plugins/theme_blond_cv/data/gang0.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/gang1.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/gang2.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/masterpatch.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/patchbay_bg.png
cinelerra-5.1/plugins/theme_blue/bluetheme.C
cinelerra-5.1/plugins/theme_blue/data/gang0.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/gang1.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/gang2.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/masterpatch.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/patchbay_bg.png
cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C
cinelerra-5.1/plugins/theme_blue_dot/data/gang0.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/gang1.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/gang2.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/masterpatch.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/patch_checked.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/patch_checkedhi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/patch_dn.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/patch_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/patch_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/patchbay_bg.png
cinelerra-5.1/plugins/theme_bright/brighttheme.C
cinelerra-5.1/plugins/theme_bright/data/gang0.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/gang1.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/gang2.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/masterpatch.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/patchbay_bg.png
cinelerra-5.1/plugins/theme_cakewalk/cakewalk.C
cinelerra-5.1/plugins/theme_cakewalk/data/gang0.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_cakewalk/data/gang1.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_cakewalk/data/gang2.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_cakewalk/data/masterpatch.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_cakewalk/data/patchbay_bg.png
cinelerra-5.1/plugins/theme_hulk/data/gang0.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/gang1.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/gang2.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/masterpatch.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/patchbay_bg.png
cinelerra-5.1/plugins/theme_hulk/hulktheme.C
cinelerra-5.1/plugins/theme_neophyte/data/gang0.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/gang1.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/gang2.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/masterpatch.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/patchbay_bg.png
cinelerra-5.1/plugins/theme_neophyte/neophyte.C
cinelerra-5.1/plugins/theme_pinklady/data/gang0.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/gang1.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/gang2.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/masterpatch.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/patchbay_bg.png
cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C
cinelerra-5.1/plugins/theme_suv/data/gang0.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/gang1.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/gang2.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/masterpatch.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/patchbay_bg.png
cinelerra-5.1/plugins/theme_suv/suv.C
cinelerra-5.1/plugins/theme_unflat/data/gang0.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/gang1.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/gang2.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/masterpatch.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/patchbay_bg.png
cinelerra-5.1/plugins/theme_unflat/unflattheme.C

index 0e8adca2f159ba7ce8b32a8ec473df6c8be9efa9..59d18244c34260c9f4d26a1874f86bc22234d112 100644 (file)
@@ -188,7 +188,7 @@ void APatchGUI::update_faders(float v)
        float change = v - current->get_value();
        current->set_value(v);
 
-       if( track->gang && track->record )
+       if( track->is_ganged() && track->is_armed() )
                patchbay->synchronize_faders(change, TRACK_AUDIO, track);
        mwindow->undo->update_undo_after(_("fade"), LOAD_AUTOMATION);
        change_source = 0;
index cb0279af049029c02861cfc183700e85052175e0..1c6be93189ed3c0467c92317da382b2d08c5e1fc 100644 (file)
@@ -178,18 +178,17 @@ void AppearancePrefs::create_objects()
                x2, y, xS(80), yS(24), clr_color, clr_alpha));
        draw_3d_border(x2-2,y-2, xS(80)+4,xS(24)+4, 1);
        cwdw_bg_color->create_objects();
+       x2 += cwdw_bg_color->get_w();
        y += ys35;
 
-       x = x1;
-       add_subwindow(title = new BC_Title(x, y, _("YUV color space:")));
-       x += title->get_w() + margin;
+       add_subwindow(title = new BC_Title(x1, y, _("YUV color space:")));
+       x = x2 - xS(120);
        add_subwindow(yuv_color_space = new YuvColorSpace(x, y, pwindow));
        yuv_color_space->create_objects();
        y += yuv_color_space->get_h() + ys5;
 
-       x = x1;
-       add_subwindow(title = new BC_Title(x, y, _("YUV color range:")));
-       x += title->get_w() + margin;
+       add_subwindow(title = new BC_Title(x1, y, _("YUV color range:")));
+       x = x2 - xS(100);
        add_subwindow(yuv_color_range = new YuvColorRange(x, y, pwindow));
        yuv_color_range->create_objects();
        y += yuv_color_range->get_h() + ys35;
index 8c3ddaecc6b596035ff0c7c1df83c31214af0190..e7ef3426f1a5d2071ed0872eeb5fc68dddbf1ad5 100644 (file)
@@ -337,8 +337,8 @@ public:
 
 class YuvColorSpace : public BC_PopupMenu
 {
-       static const char *color_space[3];
 public:
+       static const char *color_space[3];
        YuvColorSpace(int x, int y, PreferencesWindow *pwindow);
        ~YuvColorSpace();
 
@@ -359,8 +359,8 @@ public:
 
 class YuvColorRange : public BC_PopupMenu
 {
-       static const char *color_range[2];
 public:
+       static const char *color_range[2];
        YuvColorRange(int x, int y, PreferencesWindow *pwindow);
        ~YuvColorRange();
 
index b74a0a7cadefa42cc258d79629b33897fc1f0a1c..33e3cbc8bd33a7aa93513a6c368797deb23e52da 100644 (file)
@@ -170,7 +170,7 @@ VFrame *AssetVIcon::frame()
                if( !temp )
                        temp = new VFrame(0, -1, asset->width, asset->height, BC_RGB888, -1);
                File *file = mwindow->video_cache->check_out(asset, mwindow->edl, 1);
-               while( file && seq_no >= images.size() ) {
+               while( file && seq_no >= images.size() && !avt->interrupted ) {
                        int64_t pos = images.size() / picon->gui->vicon_thread->refresh_rate * frame_rate;
                        file->set_video_position(pos,0);
                        file->set_layer(0);
@@ -179,12 +179,15 @@ VFrame *AssetVIcon::frame()
                        mwindow->video_cache->check_in(asset);
                        Thread::yield();
                        file = 0;
-                       for( int retries=1000; !file && --retries>=0; usleep(10000) )
+                       for( int retries=1000; !file && --retries>=0; usleep(10000) ) {
+                               if( avt->interrupted ) return 0;
                                file = mwindow->video_cache->check_out(asset, mwindow->edl, 0);
+                       }
                }
                if( !file ) { broken = 1;  return 0; }
                mwindow->video_cache->check_in(asset);
        }
+       if( seq_no >= images.size() ) return 0;
        return *images[seq_no];
 }
 
@@ -534,7 +537,7 @@ void AssetViewPopup::draw_vframe(VFrame *vframe)
        double total_length = edl->tracks->total_length();
        if( !total_length ) total_length = 1;
        for( Track *track=edl->tracks->first; track!=0; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                for( Edit *edit=track->edits->first; edit!=0; edit=edit->next ) {
                        Indexable *indexable = (Indexable *)edit->asset;
                        if( !indexable ) indexable = (Indexable *)edit->nested_edl;
index f13642c856cbcecd4cd6c08f41f81787221dfcfc..93794d516f842acea5469b703e9f36b3c1170afc 100644 (file)
@@ -364,7 +364,7 @@ void CreateBD_Thread::handle_close_event(int result)
                Tracks *tracks = mwindow->edl->tracks;
                for( Track *vtrk=tracks->first; vtrk; vtrk=vtrk->next ) {
                        if( vtrk->data_type != TRACK_VIDEO ) continue;
-                       if( !vtrk->record ) continue;
+                       if( !vtrk->is_armed() ) continue;
                        vtrk->expand_view = 1;
                        PluginSet *plugin_set = new PluginSet(mwindow->edl, vtrk);
                        vtrk->plugin_set.append(plugin_set);
@@ -874,7 +874,7 @@ insert_video_plugin(const char *title, KeyFrame *default_keyframe)
        Tracks *tracks = mwindow->edl->tracks;
        for( Track *vtrk=tracks->first; vtrk; vtrk=vtrk->next ) {
                if( vtrk->data_type != TRACK_VIDEO ) continue;
-               if( !vtrk->record ) continue;
+               if( !vtrk->is_armed() ) continue;
                vtrk->expand_view = 1;
                PluginSet *plugin_set = new PluginSet(mwindow->edl, vtrk);
                vtrk->plugin_set.append(plugin_set);
@@ -898,7 +898,7 @@ resize_tracks()
        if( trk_h < bd_height ) trk_h = bd_height;
        for( Track *vtrk=tracks->first; vtrk; vtrk=vtrk->next ) {
                if( vtrk->data_type != TRACK_VIDEO ) continue;
-               if( !vtrk->record ) continue;
+               if( !vtrk->is_armed() ) continue;
                vtrk->track_w = trk_w;
                vtrk->track_h = trk_h;
        }
@@ -933,7 +933,7 @@ option_presets()
        max_w = 0;  max_h = 0;
        int has_deinterlace = 0, has_scale = 0;
        for( Track *trk=tracks->first; trk; trk=trk->next ) {
-               if( !trk->record ) continue;
+               if( !trk->is_armed() ) continue;
                Edits *edits = trk->edits;
                switch( trk->data_type ) {
                case TRACK_VIDEO:
@@ -973,7 +973,7 @@ option_presets()
                if( max_h != bd_height ) use_resize_tracks = 1;
        }
        for( Track *trk=tracks->first; trk && !use_resize_tracks; trk=trk->next ) {
-               if( !trk->record ) continue;
+               if( !trk->is_armed() ) continue;
                switch( trk->data_type ) {
                case TRACK_VIDEO:
                        if( trk->track_w != max_w ) use_resize_tracks = 1;
index 4328162356a290db813da21f4faf84f50ef7fb80..5c2ed20785be62ff25f1efbef060320dfdb89f67 100644 (file)
@@ -124,7 +124,7 @@ Track* CWindow::calculate_affected_track()
        Track *track = mwindow->edl->tracks->first;
        for( ; track; track=track->next ) {
                if( track->data_type != TRACK_VIDEO ) continue;
-               if( track->record ) break;
+               if( track->is_armed() ) break;
        }
        return track;
 }
@@ -134,7 +134,7 @@ Track* CWindow::calculate_mask_track()
        Track *track = mwindow->edl->tracks->first;
        for( ; track; track=track->next ) {
                if( track->data_type != TRACK_VIDEO ) continue;
-               if( track->record && track->get_id() == mask_track_id ) break;
+               if( track->is_armed() && track->get_id() == mask_track_id ) break;
        }
        return track;
 }
index 97ee1ceb260b02849b6f7e0c3545c92674cfc748..7f5ddf5fa87ef189fc4d7e05474ce94129e77e78 100644 (file)
@@ -760,7 +760,8 @@ CWindowEditing::CWindowEditing(MWindow *mwindow, CWindow *cwindow)
                0, // use_commerical
                0, // use_goto
                1, // use_clk2play
-               1) // use_scope
+               1, // use_scope
+               0) // use_gang_tracks
 {
        this->mwindow = mwindow;
        this->cwindow = cwindow;
@@ -825,6 +826,7 @@ void panel_btn(set_editing_mode,(int mode), set_editing_mode(mode))
 void panel_btn(set_auto_keyframes,(int v), set_auto_keyframes(v))
 void panel_btn(set_span_keyframes,(int v), set_span_keyframes(v))
 void panel_btn(set_labels_follow_edits,(int v), set_labels_follow_edits(v))
+void panel_btn(set_gang_tracks,(int v), set_gang_tracks(v))
 
 
 CWindowMeters::CWindowMeters(MWindow *mwindow,
index df1e01c806fba5f1bb000dd859265b2a353266a2..0d79d8707f67dbc0aa411fe3a3eb81751ce23022 100644 (file)
@@ -186,6 +186,7 @@ public:
        void panel_set_auto_keyframes(int v);
        void panel_set_span_keyframes(int v);
        void panel_set_labels_follow_edits(int v);
+       void panel_set_gang_tracks(int v);
 
        MWindow *mwindow;
        CWindow *cwindow;
index f3fd68e330660b86d1d207f78ed20d2244c38a2c..55d64b4504a871d9588508618ed8fd17618f640b 100644 (file)
@@ -1740,7 +1740,7 @@ int CWindowMaskOnTrack::handle_event()
        if( k >= 0 ) {
                track_item = (CWindowMaskItem *)track_items[k];
                Track *track = track_item ? mwindow->edl->tracks->get_track_by_id(track_item->id) : 0;
-               if( track && track->record ) track_id = track->get_id();
+               if( track && track->is_armed() ) track_id = track->get_id();
        }
        else
                track_id = mwindow->cwindow->mask_track_id;
@@ -1764,7 +1764,7 @@ void CWindowMaskOnTrack::update_items()
        for( Track *track=mwindow->edl->tracks->first; track; track=track->next ) {
                if( track->data_type != TRACK_VIDEO ) continue;
                MaskAutos *mask_autos = (MaskAutos*)track->automation->autos[AUTOMATION_MASK];
-               int color = !track->record ? RED : mask_autos->first ?  high_color : -1;
+               int color = !track->is_armed() ? RED : mask_autos->first ?  high_color : -1;
                MaskAuto *mask_auto = (MaskAuto*)mask_autos->default_auto;
                for( int i=0; color<0 && i<mask_auto->masks.size(); ++i )
                        if( mask_auto->masks[i]->points.size() > 0 ) color = high_color;
@@ -1812,7 +1812,7 @@ int CWindowMaskTrackTumbler::do_event(int dir)
                        track_item = items[0];
        }
        Track *track = track_item ? mwindow->edl->tracks->get_track_by_id(track_item->id) : 0;
-       int track_id = track_item && track && track->record ? track_item->id : -1;
+       int track_id = track_item && track && track->is_armed() ? track_item->id : -1;
        gui->mask_on_track->set_back_color(track_id >= 0 ?
                gui->get_resources()->text_background :
                gui->get_resources()->text_background_disarmed);
@@ -3021,7 +3021,7 @@ void CWindowMaskGUI::update()
 //printf("CWindowMaskGUI::update 1\n");
        get_keyframe(track, autos, keyframe, mask, point, 0);
        mwindow->cwindow->mask_track_id = track ? track->get_id() : -1;
-       mask_on_track->set_back_color(!track || track->record ?
+       mask_on_track->set_back_color(!track || track->is_armed() ?
                get_resources()->text_background :
                get_resources()->text_background_disarmed);
        mask_on_track->update_items();
index adeb8df59b2a0e3a5e9436afe003bfb346835647..4c8ab188aadc2518a88e6c7ff8938e4b7bb2aab6 100644 (file)
@@ -486,7 +486,7 @@ void CreateDVD_Thread::handle_close_event(int result)
                Tracks *tracks = mwindow->edl->tracks;
                for( Track *vtrk=tracks->first; vtrk; vtrk=vtrk->next ) {
                        if( vtrk->data_type != TRACK_VIDEO ) continue;
-                       if( !vtrk->record ) continue;
+                       if( !vtrk->is_armed() ) continue;
                        vtrk->expand_view = 1;
                        PluginSet *plugin_set = new PluginSet(mwindow->edl, vtrk);
                        vtrk->plugin_set.append(plugin_set);
@@ -1015,7 +1015,7 @@ insert_video_plugin(const char *title, KeyFrame *default_keyframe)
        Tracks *tracks = mwindow->edl->tracks;
        for( Track *vtrk=tracks->first; vtrk; vtrk=vtrk->next ) {
                if( vtrk->data_type != TRACK_VIDEO ) continue;
-               if( !vtrk->record ) continue;
+               if( !vtrk->is_armed() ) continue;
                vtrk->expand_view = 1;
                PluginSet *plugin_set = new PluginSet(mwindow->edl, vtrk);
                vtrk->plugin_set.append(plugin_set);
@@ -1039,7 +1039,7 @@ resize_tracks()
        if( trk_h < dvd_height ) trk_h = dvd_height;
        for( Track *vtrk=tracks->first; vtrk; vtrk=vtrk->next ) {
                if( vtrk->data_type != TRACK_VIDEO ) continue;
-               if( !vtrk->record ) continue;
+               if( !vtrk->is_armed() ) continue;
                vtrk->track_w = trk_w;
                vtrk->track_h = trk_h;
        }
@@ -1072,7 +1072,7 @@ option_presets()
        max_w = 0;  max_h = 0;
        int has_deinterlace = 0, has_scale = 0;
        for( Track *trk=tracks->first; trk; trk=trk->next ) {
-               if( !trk->record ) continue;
+               if( !trk->is_armed() ) continue;
                Edits *edits = trk->edits;
                switch( trk->data_type ) {
                case TRACK_VIDEO:
@@ -1111,7 +1111,7 @@ option_presets()
                if( max_h != dvd_height ) use_resize_tracks = 1;
        }
        for( Track *trk=tracks->first; trk && !use_resize_tracks; trk=trk->next ) {
-               if( !trk->record ) continue;
+               if( !trk->is_armed() ) continue;
                switch( trk->data_type ) {
                case TRACK_VIDEO:
                        if( trk->track_w != max_w ) use_resize_tracks = 1;
index f06194f8a1de251b2472662176155ac76a1efeaa..f32d1c15cfef084a7c195eed0f3afbb63f5cda78 100644 (file)
@@ -247,12 +247,36 @@ int Edit::silence()
 
 void Edit::set_selected(int v)
 {
-       if( group_id )
-               edl->tracks->set_group_selected(group_id, v);
+       if( !group_id ) {
+               if( v < 0 ) v = !is_selected ? 1 : 0;
+               int gang = edl->session->gang_tracks != GANG_NONE ? 1 : 0;
+               select_affected_edits(v, gang);
+       }
        else
-               is_selected = v >= 0 ? v : !is_selected ? 1 : 0;
+               edl->tracks->set_group_selected(group_id, v);
 }
 
+// gang<0: rest of tracks, gang==0: this track, gang>0: to next master
+void Edit::select_affected_edits(int v, int gang)
+{
+       is_selected = v;
+       if( !gang ) return;
+       double position = track->from_units(startproject);
+       for( Track *current=track->next; current; current=current->next ) {
+               if( gang > 0 && current->master ) break;
+               if( !current->is_armed() ) continue;
+               for( Edit *edit=current->edits->first; edit; edit=edit->next ) {
+                       if( edit->silence() ) continue;
+                       double start = current->from_units(edit->startproject);
+                       if( edl->equivalent(start, position) ) {
+                               edit->is_selected = v;
+                               break;
+                       }
+               }
+       }
+}
+
+
 void Edit::copy_from(Edit *edit)
 {
        this->orig_id = edit->orig_id;
index 290bf63e5b46800aa1fa7dbb712c4b95cce4cb4c..95dff778d00883fb3fb16d55da2c4a86fa35948f 100644 (file)
@@ -95,6 +95,7 @@ public:
 // Determine if silence depending on existance of asset or plugin title
        virtual int silence();
        void set_selected(int v);
+       void select_affected_edits(int v, int gang);
 
 // Media edit information
 // Units are native units for the track.
index 188d415aacfc54b02998a08d463e7fd6ca13b30f..070681e8e3cd4061573755802df74c92e39dc8c8 100644 (file)
@@ -64,7 +64,7 @@ void EditLengthThread::start(Edit *edit)
                        track && !got_it;
                        track = track->next)
                {
-                       if(track->record)
+                       if(track->is_armed())
                        {
                                int64_t start_units = track->to_units(start, 0);
                                int64_t end_units = track->to_units(end, 0);
index 11e1fc5c84609142bdc9af982999c03c3cedf395..4d3f366b744f6e655c6ce3cf3322290d8b2514f6 100644 (file)
@@ -75,7 +75,8 @@ EditPanel::EditPanel(MWindow *mwindow,
        int use_commercial,
        int use_goto,
        int use_clk2play,
-       int use_scope)
+       int use_scope,
+       int use_gang_tracks)
 {
        this->window_id = window_id;
        this->editing_mode = editing_mode;
@@ -98,6 +99,7 @@ EditPanel::EditPanel(MWindow *mwindow,
        this->use_goto = use_goto;
        this->use_clk2play = use_clk2play;
        this->use_scope = use_scope;
+       this->use_gang_tracks = use_gang_tracks;
 
        this->x = x;
        this->y = y;
@@ -117,6 +119,7 @@ EditPanel::EditPanel(MWindow *mwindow,
        this->nextlabel = 0;
        this->prevedit = 0;
        this->nextedit = 0;
+       this->gang_tracks = 0;
        this->undo = 0;
        this->redo = 0;
        this->meter_panel = 0;
@@ -157,6 +160,7 @@ void EditPanel::update()
                        mwindow->edl->session->vwindow_click2play ;
                click2play->set_value(value);
        }
+       if( gang_tracks ) gang_tracks->update(mwindow->edl->session->gang_tracks);
        if( meters ) {
                if( is_cwindow() ) {
                        meters->update(mwindow->edl->session->cwindow_meter);
@@ -318,6 +322,12 @@ void EditPanel::create_buttons()
                scope_dialog = new EditPanelScopeDialog(mwindow, this);
        }
 
+       if( use_gang_tracks ) {
+               gang_tracks = new EditPanelGangTracks(mwindow, this, x1, y1-yS(1));
+               subwindow->add_subwindow(gang_tracks);
+               x1 += gang_tracks->get_w();
+       }
+
        if( use_meters ) {
                if( meter_panel ) {
                        meters = new MeterShow(mwindow, meter_panel, x1, y1);
@@ -1304,3 +1314,46 @@ int EditPanelScope::handle_event()
        return 1;
 }
 
+EditPanelGangTracks::EditPanelGangTracks(MWindow *mwindow, EditPanel *panel,
+               int x, int y)
+ : BC_Button(x, y, get_images(mwindow))
+{
+       this->mwindow = mwindow;
+       this->panel = panel;
+       set_tooltip(_("Gang Tracks"));
+}
+
+EditPanelGangTracks::~EditPanelGangTracks()
+{
+}
+
+VFrame **EditPanelGangTracks::gang_images[TOTAL_GANGS];
+
+VFrame **EditPanelGangTracks::get_images(MWindow *mwindow)
+{
+       gang_images[GANG_NONE] = mwindow->theme->get_image_set("gang0");
+       gang_images[GANG_MEDIA] = mwindow->theme->get_image_set("gang1");
+       gang_images[GANG_CHANNELS] = mwindow->theme->get_image_set("gang2");
+       int gang = mwindow->edl->session->gang_tracks;
+       return gang_images[gang];
+}
+
+void EditPanelGangTracks::update(int gang)
+{
+       set_images(gang_images[gang]);
+       draw_face();
+}
+
+int EditPanelGangTracks::handle_event()
+{
+       int gang = mwindow->edl->session->gang_tracks;
+       switch( gang ) {
+       case GANG_NONE:      gang = GANG_CHANNELS;  break;
+       case GANG_CHANNELS:  gang = GANG_MEDIA;     break;
+       case GANG_MEDIA:     gang = GANG_NONE;      break;
+       }
+       update(gang);
+       panel->panel_set_gang_tracks(gang);
+       return 1;
+}
+
index b81d9fed0d385d4e654d424435fec4e7407cb313..a8104612ba1b37a8aff4f835390ae42750e10e93 100644 (file)
@@ -379,6 +379,20 @@ public:
        VFrame *output_frame;
 };
 
+class EditPanelGangTracks : public BC_Button
+{
+       static VFrame **gang_images[TOTAL_GANGS];
+public:
+       EditPanelGangTracks(MWindow *mwindow, EditPanel *panel, int x, int y);
+       ~EditPanelGangTracks();
+       VFrame **get_images(MWindow *mwindow);
+       void update(int gang);
+       int handle_event();
+       EditPanel *panel;
+       MWindow *mwindow;
+};
+
+
 class EditPanelScope : public BC_Toggle
 {
 public:
@@ -412,7 +426,8 @@ public:
                int use_commerical,
                int use_goto,
                int use_clk2play,
-               int use_scope);
+               int use_scope,
+               int use_gang_tracks);
        ~EditPanel();
 
        void set_meters(MeterPanel *meter_panel);
@@ -450,6 +465,7 @@ public:
        virtual void panel_set_auto_keyframes(int v) = 0;
        virtual void panel_set_span_keyframes(int v) = 0;
        virtual void panel_set_labels_follow_edits(int v) = 0;
+       virtual void panel_set_gang_tracks(int mode) = 0;
 
        MWindow *mwindow;
        BC_WindowBase *subwindow;
@@ -475,6 +491,7 @@ public:
        int use_goto;
        int use_clk2play;
        int use_scope;
+       int use_gang_tracks;
 
        EditFit *fit;
        EditFitAutos *fit_autos;
@@ -498,6 +515,7 @@ public:
        EditNextLabel *nextlabel;
        EditPrevEdit *prevedit;
        EditNextEdit *nextedit;
+       EditPanelGangTracks *gang_tracks;
        EditUndo *undo;
        EditRedo *redo;
        MeterShow *meters;
index f991013528f886b64554ddcb90ee5b17fafec0e5..5b24a831cf6bc7e779015bee45a8a5fefee8a8b0 100644 (file)
@@ -57,5 +57,6 @@ class LockLabelsButton;
 class EditPanelScopeGUI;
 class EditPanelScopeDialog;
 class EditPanelScope;
+class EditPanelMashMixers;
 
 #endif
index 130f80bb97c4557b1a26ff1b8587d0db21ef0e72..5df16099ea7de304e2ca7f7f582e03b288c7db4f 100644 (file)
@@ -437,7 +437,7 @@ int EDL::copy_assets(int copy_flags, double start, double end,
        if( (copy_flags & COPY_USED_ASSETS) ) {
 // Copy just the ones being used.
                for( current = tracks->first; current; current = NEXT ) {
-                       if( !current->record ) continue;
+                       if( !current->is_armed() ) continue;
                        current->copy_assets(start, end, &asset_list);
                }
        }
@@ -642,8 +642,8 @@ void EDL::create_nested(EDL *nested)
 {
        int video_tracks = 0, audio_tracks = 0;
        for( Track *track=nested->tracks->first; track!=0; track=track->next ) {
-               if( track->data_type == TRACK_VIDEO && track->record ) ++video_tracks;
-               if( track->data_type == TRACK_AUDIO && track->record ) ++audio_tracks;
+               if( track->data_type == TRACK_VIDEO && track->is_armed() ) ++video_tracks;
+               if( track->data_type == TRACK_AUDIO && track->is_armed() ) ++audio_tracks;
        }
 // renderengine properties
        if( video_tracks > 0 )
@@ -1049,6 +1049,7 @@ int EDL::get_tracks_height(Theme *theme)
 {
        int total_pixels = 0;
        for( Track *current=tracks->first; current; current=NEXT ) {
+               if( current->is_hidden() ) continue;
                total_pixels += current->vertical_span(theme);
        }
        return total_pixels;
@@ -1058,6 +1059,7 @@ int64_t EDL::get_tracks_width()
 {
        int64_t total_pixels = 0;
        for( Track *current=tracks->first; current; current=NEXT ) {
+               if( current->is_hidden() ) continue;
                int64_t pixels = current->horizontal_span();
                if( pixels > total_pixels ) total_pixels = pixels;
        }
@@ -1233,7 +1235,7 @@ void EDL::insert_asset(Asset *asset,
        }
 
        for( ; current && vtrack<layers; current=NEXT ) {
-               if( !current->record || current->data_type != TRACK_VIDEO ) continue;
+               if( !current->is_armed() || current->data_type != TRACK_VIDEO ) continue;
                current->insert_asset(new_asset, new_nested_edl,
                        length, position, vtrack++);
        }
@@ -1255,7 +1257,7 @@ void EDL::insert_asset(Asset *asset,
 
        current = tracks->first;
        for( ; current && atrack < channels; current=NEXT ) {
-               if( !current->record || current->data_type != TRACK_AUDIO ) continue;
+               if( !current->is_armed() || current->data_type != TRACK_AUDIO ) continue;
                current->insert_asset(new_asset, new_nested_edl,
                        length, position, atrack++);
        }
@@ -1309,7 +1311,7 @@ void EDL::get_shared_plugins(Track *source,
        int data_type)
 {
        for( Track *track=tracks->first; track; track=track->next ) {
-               if( track->record && omit_recordable ) continue;
+               if( track->is_armed() && omit_recordable ) continue;
                if( track == source || track->data_type != data_type ) continue;
                for( int i=0; i<track->plugin_set.size(); ++i ) {
                        Plugin *plugin = track->get_current_plugin(
@@ -1326,7 +1328,7 @@ void EDL::get_shared_tracks(Track *track,
        int omit_recordable, int data_type)
 {
        for( Track *current=tracks->first; current; current=NEXT ) {
-               if( omit_recordable && current->record ) continue;
+               if( omit_recordable && current->is_armed() ) continue;
                if( current == track || current->data_type != data_type ) continue;
                module_locations->append(new SharedLocation(tracks->number_of(current), 0));
        }
@@ -1599,7 +1601,7 @@ double EDL::next_edit(double position)
 
 // Test for edit handles after position
        for( Track *track=tracks->first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
                        double edit_end = track->from_units(edit->startproject + edit->length);
                        Units::fix_double(&edit_end);
@@ -1623,7 +1625,7 @@ double EDL::prev_edit(double position)
 
 // Test for edit handles before cursor position
        for( Track *track=tracks->first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
                        double edit_end = track->from_units(edit->startproject);
                        Units::fix_double(&edit_end);
@@ -1869,7 +1871,7 @@ EDL *EDL::selected_edits_to_clip(int packed,
        double start = DBL_MAX, end = DBL_MIN;
        Track *first_track=0, *last_track = 0;
        for( Track *track=tracks->first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                int empty = 1;
                for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
                        if( !edit->is_selected || edit->silence() ) continue;
@@ -1895,7 +1897,7 @@ EDL *EDL::selected_edits_to_clip(int packed,
        new_edl->session->video_tracks = 0;
        new_edl->session->audio_tracks = 0;
        for( Track *track=tracks->first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                if( first_track ) {
                        if( first_track != track ) continue;
                        first_track = 0;
@@ -2045,7 +2047,7 @@ void EDL::paste_edits(EDL *clip, Track *first_track, double position, int overwr
                first_track = tracks->first;
        Track *src = clip->tracks->first;
        for( Track *track=first_track; track && src; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                int64_t pos = track->to_units(position, 0);
                if( edit_edits ) {
                        for( Edit *edit=src->edits->first; edit; edit=edit->next ) {
@@ -2211,7 +2213,7 @@ int EDL::collect_effects(EDL *&group)
                Edit *edit = track->edits->first;
                while( edit && !edit->is_selected ) edit = edit->next;
                if( !edit ) continue;
-               if( !track->record ) { ret = COLLECT_EFFECTS_RECORD;  break; } 
+               if( !track->is_armed() ) { ret = COLLECT_EFFECTS_RECORD;  break; } 
                Track *new_track = 0;
                edl_shared *location = 0;
                int64_t start_pos = edit->startproject;
@@ -2300,7 +2302,7 @@ int EDL::insert_effects(EDL *group, Track *first_track)
                Edit *edit = track->edits->first;
                while( edit && !edit->is_selected ) edit = edit->next;
                if( !edit ) continue;
-               if( !track->record ) return INSERT_EFFECTS_RECORD;
+               if( !track->is_armed() ) return INSERT_EFFECTS_RECORD;
                if( track->data_type != new_track->data_type ) return INSERT_EFFECTS_TYPE;
                int gtrk = group->tracks->number_of(new_track);
                int trk = tracks->number_of(track);
@@ -2323,7 +2325,7 @@ int EDL::insert_effects(EDL *group, Track *first_track)
        new_track = group->tracks->first;
        track = first_track;
        for( ; track && new_track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                Edit *edit = track->edits->first;
                while( edit && !edit->is_selected ) edit = edit->next;
                if( !edit ) continue;
index 90a5319c5b9a37011ed6179525fc9bc244c2c68e..74eb3471d944ea832c0165c19bc98cf2952e2838 100644 (file)
@@ -129,6 +129,7 @@ EDLSession::EDLSession(EDL *edl)
        scrub_speed = 2.;
        show_assets = 1;
        show_titles = 1;
+       gang_tracks = GANG_NONE;
        si_useduration = 1;
        si_duration = 3;
        test_playback_edits = 1;
@@ -324,6 +325,7 @@ int EDLSession::load_defaults(BC_Hash *defaults)
 
        show_assets = defaults->get("SHOW_ASSETS", 1);
        show_titles = defaults->get("SHOW_TITLES", 1);
+       gang_tracks = defaults->get("GANG_TRACKS", GANG_NONE);
 //     test_playback_edits = defaults->get("TEST_PLAYBACK_EDITS", 1);
        time_format = defaults->get("TIME_FORMAT", TIME_HMSF);
        nudge_format = defaults->get("NUDGE_FORMAT", 1);
@@ -462,6 +464,7 @@ int EDLSession::save_defaults(BC_Hash *defaults)
        defaults->update("SI_DURATION",si_duration);
        defaults->update("SHOW_ASSETS", show_assets);
        defaults->update("SHOW_TITLES", show_titles);
+       defaults->update("GANG_TRACKS", gang_tracks);
 //     defaults->update("TEST_PLAYBACK_EDITS", test_playback_edits);
        defaults->update("TIME_FORMAT", time_format);
        defaults->update("NUDGE_FORMAT", nudge_format);
@@ -646,6 +649,7 @@ int EDLSession::load_xml(FileXML *file,
                safe_regions = file->tag.get_property("SAFE_REGIONS", safe_regions);
                show_assets = file->tag.get_property("SHOW_ASSETS", 1);
                show_titles = file->tag.get_property("SHOW_TITLES", 1);
+               gang_tracks = file->tag.get_property("GANG_TRACKS", GANG_NONE);
 //             test_playback_edits = file->tag.get_property("TEST_PLAYBACK_EDITS", test_playback_edits);
                time_format = file->tag.get_property("TIME_FORMAT", time_format);
                nudge_format = file->tag.get_property("NUDGE_FORMAT", nudge_format);
@@ -715,6 +719,7 @@ int EDLSession::save_xml(FileXML *file)
        file->tag.set_property("SAFE_REGIONS", safe_regions);
        file->tag.set_property("SHOW_ASSETS", show_assets);
        file->tag.set_property("SHOW_TITLES", show_titles);
+       file->tag.set_property("GANG_TRACKS", gang_tracks);
        file->tag.set_property("TEST_PLAYBACK_EDITS", test_playback_edits);
        file->tag.set_property("TIME_FORMAT", time_format);
        file->tag.set_property("NUDGE_FORMAT", nudge_format);
@@ -891,6 +896,7 @@ int EDLSession::copy(EDLSession *session)
        si_duration = session->si_duration;
        show_assets = session->show_assets;
        show_titles = session->show_titles;
+       gang_tracks = session->gang_tracks;
        test_playback_edits = session->test_playback_edits;
        time_format = session->time_format;
        nudge_format = session->nudge_format;
index aa74a1da4aab7ee54a338238d4bc030f13799fb5..b2994f181e602f07d20449b44c2601c37a4994c0 100644 (file)
@@ -203,6 +203,7 @@ public:
        int show_assets;
 // Show titles in resources
        int show_titles;
+       int gang_tracks;
 // Test for data before rendering a track
        int test_playback_edits;
 // Format to display times in
index 6b4b5a056aa7b61a452a0badb9ee5e534ceab0a1..da9cac9c33ae439cf043edff180c948f44a38400 100644 (file)
 
 #define INIT_ATRANSITION "Crossfade"
 #define INIT_VTRANSITION "Dissolve"
+#define GANG_NONE  0
+#define GANG_CHANNELS 1
+#define GANG_MEDIA 2
+#define TOTAL_GANGS 3
 
 class EDLSession;
 
index 859ae16cdcfbdee3ccc87af421f9c0289889abd5..7457773a08f51a7c4c38ba79ced81bf969a532bf 100644 (file)
@@ -645,7 +645,7 @@ void KeySpeedPatch::update_speed(float v)
        FloatAuto *current = (FloatAuto*)speed_autos->get_auto_for_editing(position);
        float change = v - current->get_value();
        current->set_value(v);
-       if( track->gang && track->record ) {
+       if( track->is_ganged() && track->is_armed() ) {
                TrackCanvas *track_canvas = patch->patchbay->pane->canvas;
                track_canvas->fill_ganged_autos(-1, change, track, current);
                track_canvas->update_ganged_autos(0, track, current);
index 6fc329b618840c16a4aa4d92c8c494a8364b2c5b..0ec9cf672a87ab07dcbd6ca213c6b685b1a06080 100644 (file)
@@ -1509,7 +1509,9 @@ ShowVWindow::ShowVWindow(MWindow *mwindow)
 }
 int ShowVWindow::handle_event()
 {
+       mwindow->gui->unlock_window();
        mwindow->show_vwindow();
+       mwindow->gui->lock_window("ShowVWindow::handle_event");
        return 1;
 }
 
@@ -1521,7 +1523,9 @@ ShowAWindow::ShowAWindow(MWindow *mwindow)
 }
 int ShowAWindow::handle_event()
 {
+       mwindow->gui->unlock_window();
        mwindow->show_awindow();
+       mwindow->gui->lock_window("ShowAWindow::handle_event");
        return 1;
 }
 
@@ -1533,7 +1537,9 @@ ShowCWindow::ShowCWindow(MWindow *mwindow)
 }
 int ShowCWindow::handle_event()
 {
+       mwindow->gui->unlock_window();
        mwindow->show_cwindow();
+       mwindow->gui->lock_window("ShowCWindow::handle_event");
        return 1;
 }
 
@@ -1548,10 +1554,12 @@ ShowGWindow::ShowGWindow(MWindow *mwindow)
 int ShowGWindow::handle_event()
 {
        if( mwindow->session->current_operation == NO_OPERATION ) {
+               mwindow->gui->unlock_window();
                if( !mwindow->session->show_gwindow )
                        mwindow->show_gwindow();
                else
                        mwindow->hide_gwindow();
+               mwindow->gui->lock_window("ShowGWindow::handle_event");
                set_checked(mwindow->session->show_gwindow);
        }
        return 1;
@@ -1566,7 +1574,9 @@ ShowLWindow::ShowLWindow(MWindow *mwindow)
 }
 int ShowLWindow::handle_event()
 {
+       mwindow->gui->unlock_window();
        mwindow->show_lwindow();
+       mwindow->gui->lock_window("ShowLWindow::handle_event");
        return 1;
 }
 
index b863a3137782863416543c375b00a5ce1c7054fb..d40b726df60d970df309e5d4c14e986418c2face 100644 (file)
@@ -143,7 +143,8 @@ MainEditing::MainEditing(MWindow *mwindow, MButtons *mbuttons, int x, int y)
                mwindow->has_commercials(), // use_commerical
                1, // use_goto
                0, // use_clk2play
-               0) // use_scope
+               0, // use_scope
+               1) // use_gang_tracks
 {
        this->mwindow = mwindow;
        this->mbuttons = mbuttons;
@@ -286,3 +287,8 @@ void MainEditing::panel_set_labels_follow_edits(int v)
         mwindow->set_labels_follow_edits(v);
 }
 
+void MainEditing::panel_set_gang_tracks(int v)
+{
+       mwindow->set_gang_tracks(v);
+}
+
index 698c4e839a11340f12867a1c3a0150246f2cb98b..dad5847fa261582fd52dc0469b76b8bf40fd5460 100644 (file)
@@ -108,6 +108,7 @@ public:
        void panel_set_auto_keyframes(int v);
        void panel_set_span_keyframes(int v);
        void panel_set_labels_follow_edits(int v);
+       void panel_set_gang_tracks(int v);
 
        MWindow *mwindow;
        MButtons *mbuttons;
index b5fe9227402cf6239206375f2942441b40865614..5a148d38a4b312f4f9d5143d6ec6dff2a9e82261 100644 (file)
@@ -704,7 +704,7 @@ void MixersAlign::nudge_tracks()
                        while( track && track->mixer_id != id ) track = track->next;
                        if( !track ) continue;
                        double nudge = mix->nudge;
-                       int record = track->record;  track->record = 1;
+                       int armed = track->armed;  track->armed = 1;
                        if( nudge < 0 ) {
                                track->clear(0, -nudge, 1,
                                        edl->session->labels_follow_edits,
@@ -716,7 +716,7 @@ void MixersAlign::nudge_tracks()
                                        edl->session->plugins_follow_edits,
                                        edl->session->autos_follow_edits);
                        }
-                       track->record = record;
+                       track->armed = armed;
                }
        }
        edl->optimize();
@@ -736,8 +736,8 @@ void MixersAlign::nudge_selected()
 
        ArrayList<int> track_arms;  // ugly
        for( Track *track=edl->tracks->first; track; track=track->next ) {
-               track_arms.append(track->record);
-               track->record = 0;
+               track_arms.append(track->armed);
+               track->armed = 0;
        }
        for( int m, i=0; (m=ma_gui->mixer_list->get_selection_number(0,i))>=0; ++i ) {
                if( m == midx ) continue;  // master does not move
@@ -749,7 +749,7 @@ void MixersAlign::nudge_selected()
                        while( track && track->mixer_id != id ) track = track->next;
                        if( !track ) continue;
                        double nudge = mix->nudge;
-                       track->record = 1;
+                       track->armed = 1;
                        double position = 0;  Track *first_track = 0;
                        EDL *clip = edl->selected_edits_to_clip(0, &position, &first_track);
                        if( clip ) {
@@ -775,12 +775,12 @@ void MixersAlign::nudge_selected()
                                position += nudge;
                                edl->paste_edits(clip, first_track, position, 1);
                        }
-                       track->record = 0;
+                       track->armed = 0;
                }
        }
        int i = 0;
        for( Track *track=edl->tracks->first; track; track=track->next )
-               track->record = track_arms[i++];
+               track->armed = track_arms[i++];
        edl->optimize();
 
        mwindow->update_gui(1);
index 7f502d10de5b430e42ad77c45693491ffca78dc8..c4e7a7cbf1fe22118a12034cffddcfe47ed2c114 100644 (file)
@@ -243,6 +243,7 @@ MWindow::MWindow()
        in_destructor = 0;
        speed_edl = 0;
        beeper = 0;
+       redraw_tracks = 0;
        shuttle = 0;
        wintv = 0;
        x10tv = 0;
@@ -265,9 +266,10 @@ MWindow::~MWindow()
 #ifdef HAVE_DVB
        gui->channel_info->stop();
 #endif
-       delete beeper;
-       delete create_bd;       create_bd = 0;
-       delete create_dvd;      create_dvd = 0;
+       delete beeper;          beeper = 0;
+       delete redraw_tracks;   redraw_tracks = 0;
+       delete create_bd;       create_bd = 0;
+       delete create_dvd;      create_dvd = 0;
 #ifdef HAVE_SHUTTLE
        delete shuttle;         shuttle = 0;
 #endif
@@ -1310,11 +1312,11 @@ void MWindow::handle_mixers(EDL *edl, int command, int wait_tracking,
                        k = mixer->mixer_ids.size();
                        while( --k >= 0 && track->get_mixer_id() != mixer->mixer_ids[k] );
                        if( k >= 0 ) {
-                               track->record = 1;
+                               track->armed = 1;
                                track->play = track->data_type == TRACK_VIDEO ? 1 : 0;
                        }
                        else
-                               track->record = track->play = 0;
+                               track->armed = track->play = 0;
                }
                zwindow->change_source(mixer_edl);
                zwindow->handle_mixer(command, 0,
@@ -1369,7 +1371,7 @@ ZWindow *MWindow::create_mixer(Indexable *indexable, double position)
        Mixer *mixer = 0;
        ZWindow *zwindow = get_mixer(mixer);
        while( track ) {
-               track->play = track->record = 0;
+               track->play = track->armed = 0;
                if( track->data_type == TRACK_VIDEO ) {
                        sprintf(track->title, _("Mixer %d"), zwindow->idx);
                }
@@ -1512,6 +1514,14 @@ void MWindow::tile_mixers()
        }
 }
 
+void MWindow::set_gang_tracks(int v)
+{
+       edl->session->gang_tracks = v;
+       gui->update(1, 1, 0, 0, 1, 0, 0);
+       gui->flush();
+}
+
+
 void MWindow::init_cache()
 {
        audio_cache = new CICache(preferences);
@@ -1782,7 +1792,7 @@ int MWindow::put_commercial()
        //check it
        for(Track *track=tracks->first; track && !errmsg; track=track->next) {
                if( track->data_type != TRACK_VIDEO ) continue;
-               if( !track->record ) continue;
+               if( !track->armed ) continue;
                if( count > 0 ) { errmsg = _("multiple video tracks"); break; }
                ++count;
                int64_t units_start = track->to_units(start,0);
@@ -1802,7 +1812,7 @@ int MWindow::put_commercial()
        //run it
        for(Track *track=tracks->first; track && !errmsg; track=track->next) {
                if( track->data_type != TRACK_VIDEO ) continue;
-               if( !track->record ) continue;
+               if( !track->armed ) continue;
                int64_t units_start = track->to_units(start,0);
                int64_t units_end = track->to_units(end,0);
                Edits *edits = track->edits;
@@ -2987,6 +2997,7 @@ void MWindow::show_lwindow()
 
 void MWindow::restore_windows()
 {
+       gui->unlock_window();
        if( !session->show_vwindow ) {
                for( int i=0, n=vwindows.size(); i<n; ++i ) {
                        VWindow *vwindow = vwindows[i];
@@ -3031,6 +3042,7 @@ void MWindow::restore_windows()
        else if( session->show_lwindow && lwindow->gui->is_hidden() )
                show_lwindow();
 
+       gui->lock_window("MWindow::restore_windows");
        gui->focus();
 }
 
@@ -5135,3 +5147,28 @@ int MWindow::get_cpus()
        return get_cpus(edl->session->output_w, edl->session->output_h);
 }
 
+void MWindow::draw_trackmovement()
+{
+       if( !redraw_tracks )
+               redraw_tracks = new DrawTrackMovement(this);
+       redraw_tracks->start();
+}
+
+DrawTrackMovement::DrawTrackMovement(MWindow *mwindow)
+ : Thread(1, 0, 0)
+{
+       this->mwindow = mwindow;
+}
+DrawTrackMovement::~DrawTrackMovement()
+{
+       join();
+}
+
+void DrawTrackMovement::run()
+{
+       mwindow->gui->lock_window("DrawTrackMovement::run");
+       mwindow->edl->tracks->update_y_pixels(mwindow->theme);
+       mwindow->gui->draw_trackmovement();
+       mwindow->gui->unlock_window();
+}
+
index 13544431ea22b75a4010e846f690c74bae46f238..d01f9ddb1299ec93dda1c127704148b9a6242e3c 100644 (file)
@@ -146,6 +146,17 @@ public:
 };
 
 
+class DrawTrackMovement : public Thread
+{
+public:
+       DrawTrackMovement(MWindow *mwindow);
+       ~DrawTrackMovement();
+       void run();
+
+       MWindow *mwindow;
+};
+
+
 class MWindow : public Thread
 {
 public:
@@ -281,6 +292,7 @@ public:
        void start_mixer();
        int select_zwindow(ZWindow *zwindow);
        void tile_mixers();
+       void set_gang_tracks(int v);
        int load_filenames(ArrayList<char*> *filenames,
                int load_mode = LOADMODE_REPLACE,
                int edl_mode = LOADMODE_EDL_CLIP,
@@ -294,6 +306,8 @@ public:
        int interrupt_indexes();  // Stop index building
 
        int redraw_time_dependancies();     // after reconfiguring the time format, sample rate, frame rate
+       void draw_trackmovement();          // after reconfiguring tracks/patchbay guis
+       DrawTrackMovement *redraw_tracks;
 
 // =========================================== movement
 
@@ -445,7 +459,7 @@ public:
 
 // TrackCanvas calls this to insert multiple effects from the drag_pluginservers
 // into pluginset_highlighted.
-       void insert_effects_canvas(double start, double length);
+       void insert_effects_canvas(Track *dest_track, double start, double length);
 
 // CWindow calls this to insert multiple effects from
 // the drag_pluginservers array.
index 7e6c644548f55b4d741836c455f272f39994df44..d0a1259484fe7aa4cf088d8690452f962fed1a65 100644 (file)
@@ -179,7 +179,7 @@ void MWindow::asset_to_all()
 
                        for( Track *current=edl->tracks->first; current; current=NEXT ) {
                                if( current->data_type == TRACK_VIDEO /* &&
-                                       current->record */  ) {
+                                       current->is_armed() */  ) {
                                        current->track_w = w;
                                        current->track_h = h;
                                }
@@ -761,19 +761,40 @@ void MWindow::insert(double position, FileXML *file,
 //printf("MWindow::insert 6 %p\n", vwindow->get_edl());
 }
 
-void MWindow::insert_effects_canvas(double start,
-       double length)
+void MWindow::insert_effects_canvas(Track *dest_track, double start, double length)
 {
-       Track *dest_track = session->track_highlighted;
-       if( !dest_track ) return;
-
        undo_before();
 
-       for( int i=0; i<session->drag_pluginservers->total; ++i ) {
-               PluginServer *plugin = session->drag_pluginservers->values[i];
-               insert_effect(plugin->title, 0, dest_track,
-                       i == 0 ? session->pluginset_highlighted : 0,
-                       start, length, PLUGIN_STANDALONE);
+       ArrayList<SharedLocation> shared_locations;
+       PluginSet *pluginset = session->pluginset_highlighted;
+       int gang = edl->session->gang_tracks != GANG_NONE ? 1 : 0;
+       int data_type = dest_track->data_type;
+       int first_track = 1;
+
+       for( Track *track=dest_track; track; track=track->next ) {
+               if( gang && track->master && !first_track ) break;
+               if( track->data_type != data_type ) continue;
+               if( !track->armed ) continue;
+               int module = edl->tracks->number_of(track);
+               for( int i=0; i<session->drag_pluginservers->total; ++i ) {
+                       PluginServer *plugin = session->drag_pluginservers->values[i];
+                       int shared = gang && plugin->multichannel ? 1 : 0;
+                       int plugin_type = !first_track && shared ?
+                               PLUGIN_SHAREDPLUGIN : PLUGIN_STANDALONE;
+                       SharedLocation *shared_location = !first_track ?
+                               &shared_locations[i] : &shared_locations.append();
+                       insert_effect(plugin->title, shared_location, track,
+                               pluginset, start, length, plugin_type);
+                       if( first_track && shared ) {
+                               shared_location->module = module;
+                               shared_location->plugin = pluginset ?
+                                       track->plugin_set.number_of(pluginset) :
+                                       track->plugin_set.total-1 ;
+                       }
+               }
+               if( !gang ) break;
+               first_track = 0;
+               pluginset = 0;
        }
 
        save_backup();
@@ -787,8 +808,6 @@ void MWindow::insert_effects_cwindow(Track *dest_track)
 {
        if( !dest_track ) return;
 
-       undo_before();
-
        double start = 0;
        double length = dest_track->get_length();
 
@@ -799,34 +818,28 @@ void MWindow::insert_effects_cwindow(Track *dest_track)
                        edl->local_session->get_selectionstart();
        }
 
-       for( int i=0; i<session->drag_pluginservers->total; ++i ) {
-               PluginServer *plugin = session->drag_pluginservers->values[i];
-               insert_effect(plugin->title, 0, dest_track, 0,
-                       start, length, PLUGIN_STANDALONE);
-       }
-
-       save_backup();
-       undo_after(_("insert effect"), LOAD_EDITS | LOAD_PATCHES);
-       restart_brender();
-       sync_parameters(CHANGE_EDL);
+       insert_effects_canvas(dest_track, start, length);
        gui->update(1, NORMAL_DRAW, 0, 0, 1, 0, 0);
 }
 
-void MWindow::insert_effect(char *title,
-       SharedLocation *shared_location,
-       int data_type,
-       int plugin_type,
-       int single_standalone)
+void MWindow::insert_effect(char *title, SharedLocation *shared_location,
+               int data_type, int plugin_type, int single_standalone)
 {
        Track *current = edl->tracks->first;
        SharedLocation shared_location_local;
        shared_location_local.copy_from(shared_location);
        int first_track = 1;
        for( ; current; current=NEXT ) {
-               if( current->data_type == data_type &&
-                       current->record ) {
+               if( current->data_type == data_type && current->is_armed() ) {
+                       double start =  edl->local_session->get_selectionstart(1);
+                       double end = edl->local_session->get_selectionend(1);
+                       double length = end - start;
+                       if( start >= end ) {
+                               start = 0;
+                               length = current->get_length();
+                       }
                        insert_effect(title, &shared_location_local,
-                               current, 0, 0, 0, plugin_type);
+                               current, 0, start, length, plugin_type);
 
                        if( first_track ) {
                                if( plugin_type == PLUGIN_STANDALONE && single_standalone ) {
@@ -1522,6 +1535,7 @@ int MWindow::paste_edls(ArrayList<EDL*> *new_edls, int load_mode,
                need_new_tracks = 1;
                for( int i=0; i<new_edls->total; ++i ) {
                        EDL *new_edl = new_edls->values[i];
+                       int first_track = 1;
                        for( Track *current=new_edl->tracks->first; current; current=NEXT ) {
                                switch( current->data_type ) {
                                case TRACK_VIDEO:
@@ -1537,6 +1551,10 @@ int MWindow::paste_edls(ArrayList<EDL*> *new_edls, int load_mode,
                                default:
                                        continue;
                                }
+                               if( first_track ) {
+                                       edl->tracks->last->master = 1;
+                                       first_track = 0;
+                               }
 // re-label only if not already labeled
                                if( new_edl->local_session->asset2edl )
                                        strcpy(current->title, edl->tracks->last->title);
@@ -1554,7 +1572,7 @@ int MWindow::paste_edls(ArrayList<EDL*> *new_edls, int load_mode,
            load_mode == LOADMODE_PASTE ) {
                Track *current = first_track ? first_track : edl->tracks->first;
                for( ; current; current=NEXT ) {
-                       if( current->record ) {
+                       if( current->is_armed() ) {
                                destination_tracks.append(current);
                        }
                }
@@ -1658,14 +1676,14 @@ int MWindow::paste_edls(ArrayList<EDL*> *new_edls, int load_mode,
                                if( destination_track < destination_tracks.total &&
                                    destination_tracks.values[destination_track]->data_type == new_track->data_type ) {
                                        Track *track = destination_tracks.values[destination_track];
-
 // Replace default keyframes if first EDL and new tracks were created.
 // This means data copied from one track and pasted to another won't retain
 // the camera position unless it's a keyframe.  If it did, previous data in the
 // track might get unknowingly corrupted.  Ideally we would detect when differing
 // default keyframes existed and create discrete keyframes for both.
                                        int replace_default = (i == 0) && need_new_tracks;
-
+// master tracks are the first track in each new edl when new tracks are created
+                                       int master = track->master;
 //printf("MWindow::paste_edls 1 %d\n", replace_default);
 // Insert new track at current position
                                        switch( load_mode ) {
@@ -1691,6 +1709,7 @@ int MWindow::paste_edls(ArrayList<EDL*> *new_edls, int load_mode,
 //PRINT_TRACE
                                        track->insert_track(new_track, current_position, replace_default,
                                                edit_plugins, edit_autos, edl_length);
+                                       if( master ) track->master = 1;
 //PRINT_TRACE
                                }
 
@@ -2164,7 +2183,7 @@ void MWindow::save_clip(EDL *new_edl, const char *txt)
        Track *track = new_edl->tracks->first;
        const char *path = edl->path;
        for( ; (!path || !*path) && track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                Edit *edit = track->edits->first;
                if( !edit ) continue;
                Indexable *indexable = edit->get_source();
@@ -2391,7 +2410,7 @@ void MWindow::remap_audio(int pattern)
        int current_track = 0;
        for( Track *current=edl->tracks->first; current; current=NEXT ) {
                if( current->data_type == TRACK_AUDIO &&
-                       current->record ) {
+                       current->is_armed() ) {
                        Autos *pan_autos = current->automation->autos[AUTOMATION_PAN];
                        PanAuto *pan_auto = (PanAuto*)pan_autos->get_auto_for_editing(-1);
 
index 7b92aa3258ae2a6635b163b0aaaff3a80329e418..c90acab712b75130c88b011d4a7105bf81276177 100644 (file)
@@ -1256,18 +1256,18 @@ int MWindowGUI::keypress_event()
                        if( (this_track = pane[i]->over_patchbay()) != 0 ) break;
                }
 
-               if( get_keypress() == TAB ) { // Switch the record button
+               if( get_keypress() == TAB ) { // Switch the armed button
                        if( this_track )
-                               this_track->record = !this_track->record ? 1 : 0;
+                               this_track->armed = !this_track->armed ? 1 : 0;
                }
                else {
                        int total_selected = mwindow->edl->tracks->total_of(Tracks::RECORD);
                        // all selected if nothing previously selected or
                        // if this patch was previously the only one selected and armed
                        int selected = !total_selected || (total_selected == 1 &&
-                               this_track && this_track->record ) ? 1 : 0;
+                               this_track && this_track->armed ) ? 1 : 0;
                        mwindow->edl->tracks->select_all(Tracks::RECORD, selected);
-                       if( !selected && this_track ) this_track->record = 1;
+                       if( !selected && this_track ) this_track->armed = 1;
                }
 
                update(0, NORMAL_DRAW, 0, 0, 1, 0, 1);
index 5abe4e6c20b15cf77c96a46d198f0856b19a085f..2ee2a70a2bd4863f26b6d5cad6035fbbcce17e4d 100644 (file)
@@ -660,7 +660,7 @@ int MWindow::nearest_plugin_keyframe(int shift_down, int dir)
        double position = dir == PLAY_FORWARD ? end : start;
        double new_position = dir == PLAY_FORWARD ? start : end;
        for( Track *track=edl->tracks->first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                for( int i=0; i<track->plugin_set.size(); ++i ) {
                        PluginSet *plugin_set = track->plugin_set[i];
                        int64_t pos = track->to_units(position, 0);
@@ -698,7 +698,7 @@ int MWindow::nearest_auto_keyframe(int shift_down, int dir)
        double position = dir == PLAY_FORWARD ? end : start;
        double new_position = dir == PLAY_FORWARD ? start : end;
        for( Track *track=edl->tracks->first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                int64_t pos = track->to_units(position, 0);
                for( int i=0; i<AUTOMATION_TOTAL; ++i ) {
                        Autos *autos = track->automation->autos[i];
index 3292eeb5543911fe576d85f51b266b77d4de1e75..381e1c0f4d925ce329b171c6c2d23ada7bd9c494 100644 (file)
@@ -283,6 +283,7 @@ int PatchBay::cursor_motion_event()
                                track;
                                track = track->next)
                        {
+                               if( track->is_hidden() ) continue;
                                int y = track->y_pixel - mwindow->edl->local_session->track_start[pane->number];
                                int h = track->vertical_span(mwindow->theme);
                                if(cursor_y >= y && cursor_y < y + h)
@@ -301,16 +302,16 @@ int PatchBay::cursor_motion_event()
                                                        }
                                                        break;
                                                case Tracks::RECORD:
-                                                       if(track->record != new_status)
+                                                       if(track->armed != new_status)
                                                        {
-                                                               track->record = new_status;
+                                                               track->armed = new_status;
                                                                update_gui = 1;
                                                        }
                                                        break;
                                                case Tracks::GANG:
-                                                       if(track->gang != new_status)
+                                                       if(track->ganged != new_status)
                                                        {
-                                                               track->gang = new_status;
+                                                               track->ganged = new_status;
                                                                update_gui = 1;
                                                        }
                                                        break;
@@ -451,10 +452,9 @@ int PatchBay::update()
 // Every patch has a GUI regardless of whether or not it is visible.
 // Make sure GUI's are allocated for every patch and deleted for non-existant
 // patches.
-       for(Track *current = mwindow->edl->tracks->first;
-               current;
-               current = NEXT, patch_count++)
+       for(Track *current = mwindow->edl->tracks->first; current; current = NEXT)
        {
+               if( current->is_hidden() ) continue;
                PatchGUI *patchgui = 0;
                int y = current->y_pixel;
                y -= mwindow->edl->local_session->track_start[pane->number];
@@ -502,6 +502,7 @@ int PatchBay::update()
                        patches.append(patchgui);
                        patchgui->create_objects();
                }
+               ++patch_count;
        }
 
        while(patches.total > patch_count)
@@ -521,8 +522,8 @@ void PatchBay::synchronize_faders(float change, int data_type, Track *skip)
                current = NEXT)
        {
                if(current->data_type == data_type &&
-                       current->gang &&
-                       current->record &&
+                       current->armed_gang(skip) &&
+                       current->is_armed() &&
                        current != skip)
                {
                        FloatAutos *fade_autos = (FloatAutos*)current->automation->autos[AUTOMATION_FADE];
@@ -551,15 +552,11 @@ void PatchBay::synchronize_faders(float change, int data_type, Track *skip)
 
 void PatchBay::synchronize_nudge(int64_t value, Track *skip)
 {
-       for(Track *current = mwindow->edl->tracks->first;
-               current;
-               current = NEXT)
-       {
-               if(current->data_type == skip->data_type &&
-                       current->gang &&
-                       current->record &&
-                       current != skip)
-               {
+       Track *current = mwindow->edl->tracks->first;
+       for( ; current; current = NEXT ) {
+               if( current->data_type == skip->data_type &&
+                   current->armed_gang(skip) && current->is_armed() &&
+                   current != skip ) {
                        current->nudge = value;
                        PatchGUI *patch = get_patch_of(current);
                        if(patch) patch->update(patch->x, patch->y);
index e69b707acb387a4b6b50bf9af0446af96cd4eae4..dc518b5cf9a002f5107714d1af56be18901aa533 100644 (file)
@@ -64,6 +64,7 @@ PatchGUI::PatchGUI(MWindow *mwindow,
        draw = 0;
        mute = 0;
        zoom = 0;
+       master = 0;
        expand = 0;
        nudge = 0;
        mix = 0;
@@ -82,6 +83,7 @@ PatchGUI::~PatchGUI()
        delete draw;
        delete mute;
        delete zoom;
+       delete master;
        delete expand;
        delete nudge;
        delete mix;
@@ -94,6 +96,7 @@ void PatchGUI::create_objects()
 
 int PatchGUI::reposition(int x, int y)
 {
+       if( track->is_hidden() ) return 0;
        int x1 = 0;
        int y1 = 0;
 
@@ -121,6 +124,8 @@ int PatchGUI::reposition(int x, int y)
                        mute->reposition_window(mute->get_x(), y1 + y);
                        x1 += mute->get_w();
                        zoom->reposition_window(zoom->get_x(), y1 + y);
+                       x1 += zoom->get_w();
+                       master->reposition_window(master->get_x(), y1 + y);
                }
                y1 += mwindow->theme->play_h;
        }
@@ -136,6 +141,7 @@ int PatchGUI::reposition(int x, int y)
 
 int PatchGUI::update(int x, int y)
 {
+       if( track->is_hidden() ) return 0;
 //TRACE("PatchGUI::update 1");
        reposition(x, y);
 //TRACE("PatchGUI::update 10");
@@ -175,11 +181,12 @@ int PatchGUI::update(int x, int y)
                        delete draw;    draw = 0;
                        delete mute;    mute = 0;
                        delete zoom;    zoom = 0;
+                       delete master;  master = 0;
                }
                else {
                        play->update(track->play);
-                       record->update(track->record);
-                       gang->update(track->gang);
+                       record->update(track->armed);
+                       gang->update(track->ganged);
                        draw->update(track->draw);
                        mute->update(mwindow->get_int_auto(this, AUTOMATION_MUTE)->value);
                }
@@ -197,6 +204,8 @@ int PatchGUI::update(int x, int y)
                patchbay->add_subwindow(mute = new MutePatch(mwindow, this, x1 + x, y1 + y));
                x1 += mute->get_w();
                patchbay->add_subwindow(zoom = new ZoomPatch(mwindow, this, x1 + x, y1 + y));
+               x1 += zoom->get_w();
+               patchbay->add_subwindow(master = new MasterPatch(mwindow, this, x1 + x, y1 + y));
        }
        if( play )
                y1 = y2;
@@ -364,7 +373,7 @@ RecordPatch::RecordPatch(MWindow *mwindow, PatchGUI *patch, int x, int y)
  : BC_Toggle(x,
                y,
                mwindow->theme->get_image_set("recordpatch_data"),
-               patch->track->record,
+               patch->track->armed,
                "",
                0,
                0,
@@ -386,8 +395,8 @@ int RecordPatch::button_press_event()
                patch->toggle_behavior(Tracks::RECORD,
                        get_value(),
                        this,
-                       &patch->track->record);
-               patch->title->set_back_color(patch->track->record ?
+                       &patch->track->armed);
+               patch->title->set_back_color(patch->track->armed ?
                        get_resources()->text_background :
                        get_resources()->text_background_disarmed);
                patch->title->set_text_row(0);
@@ -421,7 +430,7 @@ int RecordPatch::button_release_event()
 GangPatch::GangPatch(MWindow *mwindow, PatchGUI *patch, int x, int y)
  : BC_Toggle(x, y,
                mwindow->theme->get_image_set("gangpatch_data"),
-               patch->track->gang,
+               patch->track->ganged,
                "",
                0,
                0,
@@ -443,7 +452,7 @@ int GangPatch::button_press_event()
                patch->toggle_behavior(Tracks::GANG,
                        get_value(),
                        this,
-                       &patch->track->gang);
+                       &patch->track->ganged);
                return 1;
        }
        return 0;
@@ -605,15 +614,26 @@ int ZoomPatch::handle_down_event()
 }
 
 
+MasterPatch::MasterPatch(MWindow *mwindow, PatchGUI *patch, int x, int y)
+ : BC_Toggle(x, y, mwindow->theme->get_image_set("masterpatch_data"),
+               patch->track->master, "", 0, 0, 0)
+{
+       this->mwindow = mwindow;
+       this->patch = patch;
+       set_tooltip(_("Master Track"));
+}
+
+int MasterPatch::handle_event()
+{
+       patch->track->master = patch->track->master ? 0 : 1;
+       mwindow->draw_trackmovement();  // delayed, can delete *this
+       return 1;
+}
+
+
 ExpandPatch::ExpandPatch(MWindow *mwindow, PatchGUI *patch, int x, int y)
- : BC_Toggle(x,
-               y,
-               mwindow->theme->get_image_set("expandpatch_data"),
-               patch->track->expand_view,
-               "",
-               0,
-               0,
-               0)
+ : BC_Toggle(x, y, mwindow->theme->get_image_set("expandpatch_data"),
+               patch->track->expand_view, "", 0, 0, 0)
 {
        this->mwindow = mwindow;
        this->patch = patch;
@@ -655,14 +675,14 @@ TitlePatch::TitlePatch(MWindow *mwindow, PatchGUI *patch, int x, int y, int w)
 {
        this->mwindow = mwindow;
        this->patch = patch;
-       set_back_color(patch->track->record ?
+       set_back_color(patch->track->armed ?
                        get_resources()->text_background :
                        get_resources()->text_background_disarmed);
 }
 
 void TitlePatch::update(const char *text)
 {
-       set_back_color(patch->track->record ?
+       set_back_color(patch->track->armed ?
                        get_resources()->text_background :
                        get_resources()->text_background_disarmed);
        BC_TextBox::update(text);
@@ -706,7 +726,7 @@ void NudgePatch::set_value(int64_t value)
        mwindow->undo->update_undo_before(_("nudge."), this);
        patch->track->nudge = value;
 
-       if(patch->track->gang && patch->track->record)
+       if(patch->track->is_ganged() && patch->track->is_armed())
                patch->patchbay->synchronize_nudge(patch->track->nudge, patch->track);
 
        mwindow->undo->update_undo_after(_("nudge."), LOAD_PATCHES);
index a120beed07dcd21e7cbb09e284c670ca6c64c71e..edbfddedfb7d588d43f4547e314d971f8749bc14 100644 (file)
@@ -39,6 +39,7 @@ class GangPatch;
 class DrawPatch;
 class MutePatch;
 class ZoomPatch;
+class MasterPatch;
 class ExpandPatch;
 class NudgePatch;
 class MixPatch;
@@ -84,6 +85,7 @@ public:
        DrawPatch *draw;
        MutePatch *mute;
        ZoomPatch *zoom;
+       MasterPatch *master;
        ExpandPatch *expand;
        NudgePatch *nudge;
        MixPatch *mix;
@@ -172,6 +174,15 @@ public:
        PatchGUI *patch;
 };
 
+class MasterPatch : public BC_Toggle
+{
+public:
+       MasterPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
+       int handle_event();
+       MWindow *mwindow;
+       PatchGUI *patch;
+};
+
 class ExpandPatch : public BC_Toggle
 {
 public:
index f9c24fffb9c41c8948f2b254e9b6dabbe8fde1c6..fba1ae797e8652e58debdd7ae9a9fe7c45540a54 100644 (file)
@@ -435,6 +435,7 @@ void PluginDialog::apply()
 
 void PluginDialogThread::apply()
 {
+       Plugin *plugin = 0;
        if( mwindow->edl )
                mwindow->edl->session->single_standalone = single_standalone;
        if(plugin_type) {
@@ -444,16 +445,13 @@ void PluginDialogThread::apply()
                        mwindow->insert_effect(plugin_title, &shared_location,
                                data_type, plugin_type, single_standalone);
                }
-               else {
-                       Plugin *plugin = mwindow->edl->tracks->plugin_exists(plugin_id);
-                       if( plugin ) {
-                               plugin->change_plugin(plugin_title,
+               else if( (plugin=mwindow->edl->tracks->plugin_exists(plugin_id)) != 0 ) {
+                       plugin->change_plugin(plugin_title,
                                        &shared_location, plugin_type);
-                       }
-                       else if( mwindow->edl->tracks->track_exists(track) ) {
-                                       mwindow->insert_effect(plugin_title, &shared_location,
+               }
+               else if( mwindow->edl->tracks->track_exists(track) ) {
+                       mwindow->insert_effect(plugin_title, &shared_location,
                                        track, 0, 0, 0, plugin_type);
-                       }
                }
 
                mwindow->save_backup();
index d5d2ea49506b2aeae5f1be0170d09d02e1ca44c5..4f7d1734a94942baed2b2ab71c84d63bb058ff38 100644 (file)
@@ -34,7 +34,7 @@ RecordableATracks::RecordableATracks(Tracks *tracks)
                current_track;
                current_track = current_track->next)
        {
-               if(current_track->record && current_track->data_type == TRACK_AUDIO)
+               if(current_track->is_armed() && current_track->data_type == TRACK_AUDIO)
                        append((ATrack*)current_track);
        }
 }
index 4e5ae4526d74911d6717588a7dae7f57fac0ea83..d9ea7b54a3d2a96c0a2dcf1a18576d7af0fd25ee 100644 (file)
@@ -33,7 +33,7 @@ RecordableVTracks::RecordableVTracks(Tracks *tracks)
                current_track;
                current_track = current_track->next)
        {
-               if(current_track->record && current_track->data_type == TRACK_VIDEO)
+               if(current_track->is_armed() && current_track->data_type == TRACK_VIDEO)
                        append((VTrack*)current_track);
        }
 }
index 289ae2616f4b150389d7c193e4dc7a0efd4976c8..8e558fd1c221853547b2d96a4e5e52627c22c11e 100644 (file)
@@ -428,7 +428,7 @@ int SWindowGUI::update_selection()
        Edit *edit = 0;
        Tracks *tracks = edl->tracks;
        for( Track *track=tracks->first; track && !edit; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                if( track->data_type != TRACK_SUBTITLE ) continue;
                int64_t pos = track->to_units(position,0);
                edit = track->edits->editof(pos, PLAY_FORWARD, 0);
@@ -448,7 +448,7 @@ int MWindow::paste_subtitle_text(char *text, double start, double end)
        Tracks *tracks = edl->tracks;
        for( Track *track=tracks->first; track; track=track->next ) {
                if( track->data_type != TRACK_SUBTITLE ) continue;
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                int64_t start_i = track->to_units(start, 0);
                int64_t end_i = track->to_units(end, 1);
                track->edits->clear(start_i,end_i);
@@ -838,7 +838,7 @@ void SWindowGUI::save_spumux_data()
        Tracks *tracks = swindow->mwindow->edl->tracks;
        for( Track *track=tracks->first; track; track=track->next ) {
                if( track->data_type != TRACK_SUBTITLE ) continue;
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                char *cp = track_title, *ep = cp+sizeof(track_title)-6;
                for( const char *bp=track->title; cp<ep && *bp!=0; ) {
                        int wch = butf8(bp); // iswalnum(wch) broken by MS port
index af7b6cdb5b37788ab0ad335bda6d391ddbe0f49b..a565c1fbfe91845ea95f2adef0d509699351616e 100644 (file)
@@ -60,9 +60,10 @@ Track::Track(EDL *edl, Tracks *tracks) : ListItem<Track>()
        data_h = 64;
        expand_view = 0;
        draw = 1;
-       gang = 1;
+       ganged = 1;
+       master = 0;
        title[0] = 0;
-       record = 1;
+       armed = 1;
        play = 1;
        nudge = 0;
        track_w = edl->session->output_w;
@@ -88,8 +89,9 @@ int Track::copy_settings(Track *track)
 {
        this->expand_view = track->expand_view;
        this->draw = track->draw;
-       this->gang = track->gang;
-       this->record = track->record;
+       this->ganged = track->ganged;
+       this->master = track->master;
+       this->armed = track->armed;
        this->nudge = track->nudge;
        this->mixer_id = track->mixer_id;
        this->play = track->play;
@@ -316,9 +318,10 @@ int Track::load(FileXML *file, int track_offset, uint32_t load_flags)
        int current_plugin = 0;
 
 
-       record = file->tag.get_property("RECORD", record);
+       armed = file->tag.get_property("RECORD", armed);
        play = file->tag.get_property("PLAY", play);
-       gang = file->tag.get_property("GANG", gang);
+       ganged = file->tag.get_property("GANG", ganged);
+       master = file->tag.get_property("MASTER", 1);
        draw = file->tag.get_property("DRAW", draw);
        nudge = file->tag.get_property("NUDGE", nudge);
        mixer_id = file->tag.get_property("MIXER_ID", mixer_id);
@@ -845,9 +848,10 @@ void Track::synchronize_params(Track *track)
 
 int Track::dump(FILE *fp)
 {
-       fprintf(fp,"   Data type %d, draw %d, gang %d, play %d, record %d, nudge %jd, masks 0x%04x\n",
-               data_type, draw, gang, play, record, nudge, masks);
        fprintf(fp,"   Title %s\n", title);
+       fprintf(fp,"   Data type %d, draw %d, gang %d, master %d, mixer_id %d\n"
+                  "      play %d, armed %d, nudge %jd, masks 0x%04x\n",
+               data_type, draw, ganged, master, mixer_id, play, armed, nudge, masks);
        fprintf(fp,"   Edits:\n");
        for(Edit* current = edits->first; current; current = NEXT)
                current->dump(fp);
@@ -1005,11 +1009,12 @@ int Track::copy(int copy_flags, double start, double end,
 
 
        file->tag.set_title("TRACK");
-       file->tag.set_property("RECORD", record);
+       file->tag.set_property("RECORD", armed);
        file->tag.set_property("NUDGE", nudge);
        file->tag.set_property("MIXER_ID", mixer_id);
        file->tag.set_property("PLAY", play);
-       file->tag.set_property("GANG", gang);
+       file->tag.set_property("GANG", ganged);
+       file->tag.set_property("MASTER", master);
        file->tag.set_property("DRAW", draw);
        file->tag.set_property("EXPAND", expand_view);
        file->tag.set_property("DATA_H", data_h);
@@ -1851,6 +1856,48 @@ void Track::set_camera(float x, float y, float z)
        set_fauto_xyz(AUTOMATION_CAMERA_X, x, y, z);
 }
 
+Track *Track::gang_master()
+{
+       if( edl->session->gang_tracks == GANG_NONE ) return this;
+       Track *track = this;
+       while( track && !track->master ) track = track->previous;
+       return !track ? tracks->first : track;
+}
+
+int Track::is_hidden()
+{
+       if( master ) return 0;
+       if( edl->session->gang_tracks == GANG_MEDIA ) return 1;
+       if( edl->session->gang_tracks == GANG_CHANNELS ) {
+               for( Track *track=previous; track; track=track->previous ) {
+                       if( track->data_type == data_type ) return 1;
+                       if( track->master ) return 0;
+               }
+       }
+       return 0;
+}
+int Track::is_armed()
+{
+       return gang_master()->armed;
+}
+int Track::is_ganged()
+{
+       return gang_master()->ganged;
+}
+
+int Track::armed_gang(Track *track)
+{
+       if( edl->session->gang_tracks == GANG_NONE ) return ganged;
+       Track *current = gang_master();
+       for(;;) {
+               if( track == current ) return 1;
+               current = current->next;
+               if( !current || current->master ) return 0;
+       }
+       return 1;
+}
+
+
 int Track::index_in(Mixer *mixer)
 {
        if( !mixer || mixer_id < 0 ) return -1;
index ba47679c7488d08a797c6fac426ec4c34b4d9147..4f81719c2c10f4c486bc16bbeeeabe8685496bee 100644 (file)
@@ -166,6 +166,11 @@ public:
        void change_plugins(SharedLocation &old_location, SharedLocation &new_location, int do_swap);
        void change_modules(int old_location, int new_location, int do_swap);
        Plugin *plugin_exists(int plugin_id);
+       Track *gang_master();
+       int is_hidden();
+       int is_armed();
+       int is_ganged();
+       int armed_gang(Track *track);
        int index_in(Mixer *mixer);
 
        EDL *edl;
@@ -185,10 +190,10 @@ public:
 // There is some debate on whether to expand gang from faders to
 // dragging operations.  This would allow every edit in a column to get dragged
 // simultaneously.
-       int gang;
+       int ganged;
        char title[BCTEXTLEN];
        int play;
-       int record;
+       int armed;
 // mask enable bit flags
        int masks;
 // Nudge in track units.  Positive shifts track earlier in time.  This way
@@ -320,7 +325,8 @@ public:
        int pixel;   // pixel position from top of track view
 // Dimensions of this track if video
        int track_w, track_h;
-       int mixer_id;
+// mixer set track id, gang master flag
+       int mixer_id, master;
 
 private:
 // Identification of the track
index 0e42ed89109de1d18108197e4d2877d4f711f46b..dda88761e8547bfc9633e3573a84d938d8ac1689 100644 (file)
@@ -210,6 +210,7 @@ int TrackCanvas::drag_cursor_motion(int cursor_x, int cursor_y,
 // Find the edit and track the cursor is over
                for(Track *track = mwindow->edl->tracks->first; track; track = track->next)
                {
+                       if( track->is_hidden() ) continue;
                        int64_t track_x, track_y, track_w, track_h;
                        track_dimensions(track, track_x, track_y, track_w, track_h);
 
@@ -407,7 +408,7 @@ int TrackCanvas::drag_stop(int *redraw)
                                                mwindow->session->edit_highlighted->length);
                                }
                                start = mwindow->edl->align_to_frame(start, 0);
-                               mwindow->insert_effects_canvas(start, length);
+                               mwindow->insert_effects_canvas(track, start, length);
                                *redraw = 1;
                        }
                        if( mwindow->session->track_highlighted )
@@ -787,6 +788,7 @@ void TrackCanvas::draw_resources(int mode,
                current;
                current = NEXT)
        {
+               if( current->is_hidden() ) continue;
                if(debug) PRINT_TRACE
                for(Edit *edit = current->edits->first; edit; edit = edit->next)
                {
@@ -1149,7 +1151,8 @@ void TrackCanvas::draw_paste_destination()
                for(Track *dest = mwindow->session->track_highlighted;
                        dest;
                        dest = dest->next) {
-                       if(dest->record) {
+                       if( dest->is_hidden() ) continue;
+                       if(dest->is_armed()) {
 // Get source width in pixels
                                w = -1;
 // Use start of highlighted edit
@@ -1680,7 +1683,8 @@ void TrackCanvas::draw_selected_edits(EDL *edl, int dx, int dy, int color0, int
 {
        int dropping = 0;
        for( Track *track=edl->tracks->first; track; track=track->next ) {
-               if( !track->record && color1 < 0 ) {
+               if( track->is_hidden() ) continue;
+               if( !track->is_armed() && color1 < 0 ) {
                        if( dropping )
                                dy -= track->vertical_span(mwindow->theme);
                        continue;
@@ -1697,9 +1701,9 @@ void TrackCanvas::draw_selected_edits(EDL *edl, int dx, int dy, int color0, int
                        int inner = color1 < 0 ? color0 : !edit->group_id ? color0 :
                                mwindow->get_group_color(edit->group_id);
                        int outer = color1 < 0 ? color0 : !edit->group_id ? color1 : inner;
-                       set_color(track->record ? inner : outer);
+                       set_color(track->is_armed() ? inner : outer);
                        draw_selected(x, y, w, h);
-                       set_color(track->record ? outer : inner);
+                       set_color(track->is_armed() ? outer : inner);
                        draw_selected(x-1, y-1, w+2, h+2);
                        draw_selected(x-2, y-2, w+1, h+1);
                }
@@ -1725,6 +1729,7 @@ void TrackCanvas::draw_plugins()
                track;
                track = track->next)
        {
+               if( track->is_hidden() ) continue;
                if(track->expand_view)
                {
                        for(int i = 0; i < track->plugin_set.total; i++)
@@ -1891,6 +1896,7 @@ void TrackCanvas::draw_hard_edges()
        int64_t x, y, w, h;
 
        for(Track *track = mwindow->edl->tracks->first; track; track = track->next) {
+               if( track->is_hidden() ) continue;
                for(Edit *edit = track->edits->first; edit; edit = edit->next) {
                        if( !edit->hard_left && !edit->hard_right ) continue;
                        edit_dimensions(edit, x, y, w, h);
@@ -1954,6 +1960,7 @@ void TrackCanvas::draw_drag_handle()
        set_line_width(3);
 
        for( Track *track=mwindow->edl->tracks->first; track; track=track->next ) {
+               if( track->is_hidden() ) continue;
                Edit *left = 0, *right = 0;
                double start = DBL_MAX, end = DBL_MIN;
                for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
@@ -2012,6 +2019,7 @@ void TrackCanvas::draw_transitions()
        int64_t x, y, w, h;
 
        for(Track *track = mwindow->edl->tracks->first; track; track = track->next) {
+               if( track->is_hidden() ) continue;
                if( !track->show_transitions() ) continue;
 
                for(Edit *edit = track->edits->first; edit; edit = edit->next) {
@@ -2163,8 +2171,7 @@ int TrackCanvas::do_keyframes(int cursor_x,
 // track context menu to appear
        int result = 0;
        EDLSession *session = mwindow->edl->session;
-
-
+       int gang = session->gang_tracks != GANG_NONE || get_double_click() ? 1 : 0;
 
        static BC_Pixmap *auto_pixmaps[AUTOMATION_TOTAL] =
        {
@@ -2180,6 +2187,7 @@ int TrackCanvas::do_keyframes(int cursor_x,
        for(Track *track = mwindow->edl->tracks->first;
                track && !result;
                track = track->next) {
+               if( track->is_hidden() ) continue;
                Auto *auto_keyframe = 0;
                Automation *automation = track->automation;
 
@@ -2271,7 +2279,7 @@ int TrackCanvas::do_keyframes(int cursor_x,
                                                if (buttonpress != 3)
                                                {
                                                        if(i == AUTOMATION_FADE || i == AUTOMATION_SPEED)
-                                                               fill_ganged_autos(get_double_click(), 0, track,
+                                                               fill_ganged_autos(gang, 0, track,
                                                                        (FloatAuto*)mwindow->session->drag_auto);
                                                        mwindow->session->current_operation = pre_auto_operations[i];
                                                        update_drag_caption();
@@ -2365,6 +2373,7 @@ void TrackCanvas::draw_keyframe_reticle()
            keyframe_hairline == HAIRLINE_DRAGGING && dragging ) ) {
                int show = dragging || keyframe_hairline == HAIRLINE_ALWAYS ? 1 : 0;
                for( Track *track = mwindow->edl->tracks->first; track; track=track->next ) {
+                       if( track->is_hidden() ) continue;
                        Automation *automation = track->automation;
                        for( int i=0; i<AUTOMATION_TOTAL; ++i ) {
                                if( !mwindow->edl->session->auto_conf->autos[i] ) continue;
@@ -2921,7 +2930,7 @@ int TrackCanvas::test_floatline(int center_pixel,
 
 void TrackCanvas::fill_ganged_autos(int all, float change, Track *skip, FloatAuto *fauto)
 {
-       if( !skip->gang ) return;
+       if( !skip->is_ganged() ) return;
 // Handles the special case of modifying a fadeauto
 // when there are ganged faders on several tracks
        double position = skip->from_units(fauto->position);
@@ -2929,7 +2938,8 @@ void TrackCanvas::fill_ganged_autos(int all, float change, Track *skip, FloatAut
 
        for(Track *current = mwindow->edl->tracks->first; current; current = NEXT) {
                if( (all || current->data_type == skip->data_type) &&
-                   current->gang && current->record && current != skip ) {
+                   current->armed_gang(skip) && current->is_armed() &&
+                   current != skip ) {
                        FloatAutos *fade_autos = (FloatAutos*)current->automation->autos[autoidx];
                        float auto_min = mwindow->edl->local_session->automation_mins[fade_autos->autogrouptype];
                        float auto_max = mwindow->edl->local_session->automation_maxs[fade_autos->autogrouptype];
@@ -3227,7 +3237,7 @@ int TrackCanvas::do_float_autos(Track *track, Autos *autos, int cursor_x, int cu
 
 // Draw or test handle
                if( current && !result && current != autos->default_auto ) {
-                       if( !draw && track->record ) {
+                       if( !draw && track->is_armed() ) {
                                result = test_floatauto((FloatAuto*)current, (int)ax2, (int)ay2,
                                        (int)in_x2, (int)in_y2, (int)out_x2, (int)out_y2,
                                        (int)center_pixel, (int)yscale, cursor_x, cursor_y,
@@ -3244,7 +3254,7 @@ int TrackCanvas::do_float_autos(Track *track, Autos *autos, int cursor_x, int cu
                }
 
 // Draw or test joining line
-               if( !draw && !result && track->record /* && buttonpress != 3 */ ) {
+               if( !draw && !result && track->is_armed() /* && buttonpress != 3 */ ) {
                        result = test_floatline(center_pixel,
                                (FloatAutos*)autos, unit_start, zoom_units, yscale,
 // Exclude auto coverage from the end of the line.  The auto overlaps
@@ -3267,7 +3277,7 @@ int TrackCanvas::do_float_autos(Track *track, Autos *autos, int cursor_x, int cu
 
        if( ax < get_w() && !result ) {
                ax2 = get_w();  ay2 = ay;
-               if(!draw && track->record /* && buttonpress != 3 */ ) {
+               if(!draw && track->is_armed() /* && buttonpress != 3 */ ) {
                        result = test_floatline(center_pixel,
                                (FloatAutos*)autos, unit_start, zoom_units, yscale,
                                (int)ax, (int)ax2, cursor_x, cursor_y,
@@ -3372,7 +3382,7 @@ int TrackCanvas::do_int_autos(Track *track,
                        {
                                if(!draw)
                                {
-                                       if(track->record)
+                                       if(track->is_armed())
                                        {
                                                result = test_auto(current,
                                                        (int)ax2,
@@ -3401,7 +3411,7 @@ int TrackCanvas::do_int_autos(Track *track,
                {
                        if(!result)
                        {
-                               if(track->record /* && buttonpress != 3 */)
+                               if(track->is_armed() /* && buttonpress != 3 */)
                                {
                                        result = test_toggleline(autos,
                                                center_pixel,
@@ -3432,7 +3442,7 @@ int TrackCanvas::do_int_autos(Track *track,
                ay2 = ay;
                if(!draw)
                {
-                       if(track->record /* && buttonpress != 3 */)
+                       if(track->is_armed() /* && buttonpress != 3 */)
                        {
                                result = test_toggleline(autos,
                                        center_pixel,
@@ -3946,7 +3956,7 @@ int TrackCanvas::get_drag_values(float *percentage,
        *percentage = 0;
        *position = 0;
 
-       if(!current->autos->track->record) return 1;
+       if(!current->autos->track->is_armed()) return 1;
        double view_start;
        double unit_start;
        double view_end;
@@ -3982,7 +3992,7 @@ int TrackCanvas::get_drag_values(float *percentage,
 
 #define UPDATE_DRAG_HEAD(do_clamp) \
        int result = 0, center_pixel; \
-       if(!current->autos->track->record) return 0; \
+       if(!current->autos->track->is_armed()) return 0; \
        double view_start, unit_start, view_end, unit_end; \
        double yscale, zoom_sample, zoom_units; \
  \
@@ -4734,6 +4744,7 @@ int TrackCanvas::do_edit_handles(int cursor_x, int cursor_y, int button_press,
        int result = 0;
 
        for( Track *track=mwindow->edl->tracks->first; track && !result; track=track->next) {
+               if( track->is_hidden() ) continue;
                for( Edit *edit=track->edits->first; edit && !result; edit=edit->next ) {
                        int64_t edit_x, edit_y, edit_w, edit_h;
                        edit_dimensions(edit, edit_x, edit_y, edit_w, edit_h);
@@ -4830,6 +4841,7 @@ int TrackCanvas::do_edit_handles(int cursor_x, int cursor_y, int button_press,
                        if( handle_result == 1 ) edit_edge += edit_result->length;
                        double edge_position = edit_result->track->from_units(edit_edge);
                        for( Track *track=mwindow->edl->tracks->first; track!=0; track=track->next ) {
+                               if( track->is_hidden() ) continue;
                                int64_t track_position = track->to_units(edge_position, 1);
                                Edit *left_edit = track->edits->editof(track_position, PLAY_FORWARD, 0);
                                if( left_edit ) {
@@ -4876,6 +4888,7 @@ int TrackCanvas::do_plugin_handles(int cursor_x,
        for(Track *track = mwindow->edl->tracks->first;
                track && !result;
                track = track->next) {
+               if( track->is_hidden() ) continue;
                for(int i = 0; i < track->plugin_set.total && !result; i++) {
                        PluginSet *plugin_set = track->plugin_set.values[i];
                        for(Plugin *plugin = (Plugin*)plugin_set->first;
@@ -4978,6 +4991,7 @@ int TrackCanvas::do_edits(int cursor_x, int cursor_y, int button_press, int drag
        int result = 0;
 
        for(Track *track = mwindow->edl->tracks->first; track && !result; track = track->next) {
+               if( track->is_hidden() ) continue;
                for(Edit *edit = track->edits->first; edit && !result; edit = edit->next) {
                        int64_t edit_x, edit_y, edit_w, edit_h;
                        edit_dimensions(edit, edit_x, edit_y, edit_w, edit_h);
@@ -4989,9 +5003,7 @@ int TrackCanvas::do_edits(int cursor_x, int cursor_y, int button_press, int drag
                                if( button_press && get_buttonpress() == LEFT_BUTTON ) {
                                        if( get_double_click() ) {
                                                mwindow->edl->tracks->clear_selected_edits();
-                                               mwindow->edl->tracks->select_affected_edits(
-                                                       edit->track->from_units(edit->startproject),
-                                                       edit->track, 1);
+                                               edit->select_affected_edits(1, -1);
                                                double start = edit->track->from_units(edit->startproject);
                                                start = mwindow->edl->align_to_frame(start, 0);
                                                mwindow->edl->local_session->set_selectionstart(start);
@@ -5010,7 +5022,7 @@ int TrackCanvas::do_edits(int cursor_x, int cursor_y, int button_press, int drag
                                                update_cursor = -1;
                                        }
                                }
-                               else if( drag_start && track->record ) {
+                               else if( drag_start && track->is_armed() ) {
                                        mwindow->session->drag_edit = edit;
                                        mwindow->session->drag_origin_x = cursor_x;
                                        mwindow->session->drag_origin_y = cursor_y;
@@ -5027,9 +5039,7 @@ int TrackCanvas::do_edits(int cursor_x, int cursor_y, int button_press, int drag
                                                        edit->set_selected(1);
                                                }
                                                else
-                                                       mwindow->edl->tracks->select_affected_edits(
-                                                               edit->track->from_units(edit->startproject),
-                                                               edit->track, 1);
+                                                       edit->select_affected_edits(1, -1);
                                                drag_start = 1;
                                        }
 // Construct list of all affected edits
@@ -5077,7 +5087,7 @@ int TrackCanvas::test_track_group(EDL *group, Track *first_track, double &pos)
        int intersects = 0;
        Track *src = group->tracks->first;
        for( Track *track=first_track; track && src; track=track->next ) {
-               if( !track->record ) return -1;
+               if( !track->is_armed() ) return -1;
                if( src->data_type != track->data_type ) return -1;
                for( Edit *src_edit=src->edits->first; src_edit; src_edit=src_edit->next ) {
                        if( src_edit->silence() ) continue;
@@ -5197,7 +5207,7 @@ int TrackCanvas::do_plugins(int cursor_x, int cursor_y, int drag_start,
                }
                else
 // Move plugin
-               if( drag_start && plugin->track->record && !plugin->silence() ) {
+               if( drag_start && plugin->track->is_armed() && !plugin->silence() ) {
                        if( mwindow->edl->session->editing_mode == EDITING_ARROW ) {
                                if( plugin->track->data_type == TRACK_AUDIO )
                                        mwindow->session->current_operation = DRAG_AEFFECT_COPY;
@@ -5257,6 +5267,7 @@ int TrackCanvas::do_transitions(int cursor_x, int cursor_y,
 
 
        for( Track *track = mwindow->edl->tracks->first; track && !result; track = track->next ) {
+               if( track->is_hidden() ) continue;
                if( !track->show_transitions() ) continue;
 
                for( Edit *edit = track->edits->first; edit; edit = edit->next ) {
index fd7c8a86bb86b3ff3d91e08e061a03c6f804fbcc..a54720d038990e48539cf0b7bbc947f46bc6108c 100644 (file)
@@ -94,7 +94,7 @@ TrackList::get_recordable_type(int data_type)
                current_track && current_patch;
                current_track = current_track->next, current_patch = current_patch->next)
        {
-               if(current_patch->record && current_track->data_type == TRACK_AUDIO)
+               if(current_patch->is_armed() && current_track->data_type == TRACK_AUDIO)
                        append((ATrack*)current_track);
        }
 }
index c00c023d39ce25389bbc96aed2bdbd61d75d44b3..7b1d055a6ceff47d431ee212a805088f8837f413 100644 (file)
@@ -332,7 +332,7 @@ void TrackUserTitleDialogThread::handle_done_event(int result)
        const char *text = window->title_text->get_text();
        int count = 0;
        for( Track *track=edl->tracks->first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
                        if( !edit->is_selected ) continue;
                        strcpy(edit->user_title, text);
@@ -474,7 +474,7 @@ void TrackTitleColorPicker::handle_done_event(int result)
                EDL *edl = popup->mwindow->edl;
                int count = 0;
                for( Track *track=edl->tracks->first; track; track=track->next ) {
-                       if( !track->record ) continue;
+                       if( !track->is_armed() ) continue;
                        for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
                                if( !edit->is_selected ) continue;
                                edit->color = color;
index c8a6abd4df022c43c730f092492a71f232926974..71aee8fcfbaf7f8755d2acbbd241baacd95ac008 100644 (file)
@@ -113,27 +113,11 @@ void Tracks::clear_selected_edits()
        }
 }
 
-void Tracks::select_affected_edits(double position, Track *start_track, int sense)
-{
-       for( Track *track=start_track; track; track=track->next ) {
-               if( !track->record ) continue;
-               for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
-                       if( edit->silence() ) continue;
-                       double startproject = track->from_units(edit->startproject);
-                       if( edl->equivalent(startproject, position) ) {
-                               edit->is_selected = sense >= 0 ? sense :
-                                       edit->is_selected ? 0 : 1;
-                               break;
-                       }
-               }
-       }
-}
-
 void Tracks::get_selected_edits(ArrayList<Edit*> *drag_edits)
 {
        drag_edits->remove_all();
        for( Track *track=first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
                        if( !edit->is_selected ) continue;
                        drag_edits->append(edit);
@@ -152,7 +136,7 @@ void Tracks::get_automation_extents(float *min,
        int coords_undefined = 1;
        for(Track *current = first; current; current = NEXT)
        {
-               if(current->record)
+               if(current->is_armed())
                {
                        current->automation->get_extents(min,
                                max,
@@ -332,21 +316,26 @@ Track* Tracks::add_subttl_track(int above, Track *dst_track)
 
 int Tracks::delete_track(Track *track)
 {
-       if (!track)
-               return 0;
-
-       int old_location = number_of(track);
-       detach_shared_effects(old_location);
-
+       if( !track ) return 0;
+       int gang = edl->session->gang_tracks != GANG_NONE ? 1 : 0;
+       Track *nxt = track->next;
+       if( gang ) {
+               while( track && !track->master && track->previous )
+                       track = track->previous;
+               while( nxt && !nxt->master )
+                       nxt = nxt->next;
+       }
+       Track *current = track;
+       int old_location = number_of(current);
+       for( Track *next_track=0; current!=nxt; current=next_track ) {
+               next_track = current->next;
+               detach_shared_effects(old_location);
+               for( Track *curr=current; curr; curr=curr->next ) {
 // Shift effects referencing effects below the deleted track
-       for(Track *current = track;
-               current;
-               current = NEXT)
-       {
-               change_modules(number_of(current), number_of(current) - 1, 0);
+                       change_modules(number_of(curr), number_of(curr)-1, 0);
+               }
+               delete current;
        }
-       if(track) delete track;
-
        return 0;
 }
 
@@ -374,8 +363,8 @@ int Tracks::total_of(int type)
 
                result +=
                        (current->play && type == PLAY) ||
-                       (current->record && type == RECORD) ||
-                       (current->gang && type == GANG) ||
+                       (current->is_armed() && type == RECORD) ||
+                       (current->is_ganged() && type == GANG) ||
                        (current->draw && type == DRAW) ||
                        (mute_auto->value && type == MUTE) ||
                        (current->expand_view && type == EXPAND);
@@ -387,7 +376,7 @@ int Tracks::recordable_audio_tracks()
 {
        int result = 0;
        for(Track *current = first; current; current = NEXT)
-               if(current->data_type == TRACK_AUDIO && current->record) result++;
+               if(current->data_type == TRACK_AUDIO && current->is_armed()) result++;
        return result;
 }
 
@@ -396,7 +385,7 @@ int Tracks::recordable_video_tracks()
        int result = 0;
        for(Track *current = first; current; current = NEXT)
        {
-               if(current->data_type == TRACK_VIDEO && current->record) result++;
+               if(current->data_type == TRACK_VIDEO && current->is_armed()) result++;
        }
        return result;
 }
@@ -466,7 +455,7 @@ double Tracks::total_recordable_length()
        double total = -1;
        for(Track *current = first; current; current = NEXT)
        {
-               if(current->record)
+               if(current->is_armed())
                {
                        double length = current->get_length();
                        if(length > total) total = length;
@@ -526,7 +515,7 @@ void Tracks::translate_fauto_xy(int fauto, float dx, float dy, int all)
 {
        Track *track = first;
        for( ; track; track=track->next ) {
-               if( !all && !track->record ) continue;
+               if( !all && !track->is_armed() ) continue;
                if( track->data_type != TRACK_VIDEO ) continue;
                ((VTrack*)track)->translate(fauto, dx, dy, all);
        }
@@ -548,7 +537,7 @@ void Tracks::crop_resize(float x, float y, float z)
        float ctr_y = edl->session->output_h / 2.;
        Track *track = first;
        for( ; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                if( track->data_type != TRACK_VIDEO ) continue;
                float px, py, pz;
                track->get_projector(px, py, pz);
@@ -566,7 +555,7 @@ void Tracks::crop_shrink(float x, float y, float z)
        float ctr_y = edl->session->output_h / 2.;
        Track *track = first;
        for( ; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                if( track->data_type != TRACK_VIDEO ) continue;
                float cx, cy, cz, px, py, pz;
                track->get_camera(cx, cy, cz);
@@ -589,6 +578,7 @@ void Tracks::update_y_pixels(Theme *theme)
        {
 //printf("Tracks::update_y_pixels %d\n", y);
                current->y_pixel = y;
+               if( current->is_hidden() ) continue;
                y += current->vertical_span(theme);
        }
 }
@@ -612,8 +602,8 @@ void Tracks::select_all(int type,
                double position = edl->local_session->get_selectionstart(1);
 
                if(type == PLAY) current->play = value;
-               if(type == RECORD) current->record = value;
-               if(type == GANG) current->gang = value;
+               if(type == RECORD) current->armed = value;
+               if(type == GANG) current->ganged = value;
                if(type == DRAW) current->draw = value;
 
                if(type == MUTE)
@@ -718,7 +708,7 @@ int Tracks::new_group(int id)
 {
        int count = 0;
        for( Track *track=first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
                        if( edit->group_id > 0 ) continue;
                        if( !edit->is_selected ) continue;
@@ -732,10 +722,13 @@ int Tracks::new_group(int id)
 int Tracks::set_group_selected(int id, int v)
 {
        int count = 0;
+       int gang = edl->session->gang_tracks != GANG_NONE ? 1 : 0;
        for( Track *track=first; track; track=track->next ) {
+               if( track->is_hidden() ) continue;
                for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
                        if( edit->group_id != id ) continue;
-                       edit->is_selected = v >= 0 ? v : !edit->is_selected ? 1 : 0;
+                       if( v < 0 ) v = !edit->is_selected ? 1 : 0;
+                       edit->select_affected_edits(v, gang);
                        ++count;
                }
        }
@@ -766,3 +759,21 @@ Track *Tracks::get(int idx, int data_type)
        return 0;
 }
 
+void Tracks::move_tracks(Track *src, Track *dst, int n)
+{
+       if( src == dst ) return;
+       while( --n >= 0 && src ) {
+               Track *nxt = src->next;
+               change_modules(number_of(src), total(), 0);
+               for( Track *track=nxt; track; track=track->next )
+                       change_modules(number_of(track), number_of(track)-1, 0);
+               remove_pointer(src);
+               int ndst = dst ? number_of(dst) : total();
+               insert_before(dst, src);
+               for( Track *track=last; track && track!=src; track=track->previous ) 
+                       change_modules(number_of(track)-1, number_of(track), 0);
+               change_modules(total(), ndst, 0);
+               src = nxt;
+       }
+}
+
index 88a96e484e39767725cc1cdbc1fe8057bb8ea9e3..f5a328ed5f8fc78295619dbb8ef17179ad455894 100644 (file)
@@ -57,7 +57,6 @@ public:
 
 // Construct a list of all the recordable edits which start on position
        void clear_selected_edits();
-       void select_affected_edits(double position, Track *start_track, int sense);
        int clear_hard_edges(double start, double end);
        void get_selected_edits(ArrayList<Edit*> *drag_edits);
        int next_group_id();
@@ -73,6 +72,7 @@ public:
 
        void equivalent_output(Tracks *tracks, double *result);
 
+       void move_tracks(Track *src, Track *dst, int n);
        int move_track_up(Track *track);        // move recordable tracks up
        int move_track_down(Track *track);      // move recordable tracks down
        int move_tracks_up();                   // move recordable tracks up
index 7f46fcb228d10ed4a7c50d3ae9de87d12fd5fbaf..849d6942cb24ebd7a058d534cf77d25448421c2d 100644 (file)
@@ -50,7 +50,7 @@
 int Tracks::blade(double position)
 {
        for( Track *track=first; track!=0; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                track->blade(position);
        }
        return 0;
@@ -64,7 +64,7 @@ int Tracks::clear(double start, double end, int clear_plugins, int edit_autos)
                current_track;
                current_track = current_track->next)
        {
-               if(current_track->record)
+               if(current_track->is_armed())
                {
                        current_track->clear(start,
                                end,
@@ -84,7 +84,7 @@ void Tracks::clear_automation(double selectionstart, double selectionend)
 
        for(current_track = first; current_track; current_track = current_track->next)
        {
-               if(current_track->record)
+               if(current_track->is_armed())
                {
                        current_track->clear_automation(selectionstart,
                                selectionend,
@@ -100,7 +100,7 @@ void Tracks::clear_transitions(double start, double end)
                current_track;
                current_track = current_track->next)
        {
-               if(current_track->record)
+               if(current_track->is_armed())
                {
                        int64_t start_units = current_track->to_units(start, 0);
                        int64_t end_units = current_track->to_units(end, 0);
@@ -123,7 +123,7 @@ void Tracks::clear_transitions(double start, double end)
 int Tracks::clear_hard_edges(double start, double end)
 {
        for( Track *track=first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                int64_t start_units = track->to_units(start, 0);
                int64_t end_units = track->to_units(end, 0);
 
@@ -156,7 +156,7 @@ void Tracks::shuffle_edits(double start, double end)
                current_track;
                current_track = current_track->next)
        {
-               if(current_track->record)
+               if(current_track->is_armed())
                {
                        current_track->shuffle_edits(start, end, first_track);
 
@@ -174,7 +174,7 @@ void Tracks::reverse_edits(double start, double end)
                current_track;
                current_track = current_track->next)
        {
-               if(current_track->record)
+               if(current_track->is_armed())
                {
                        current_track->reverse_edits(start, end, first_track);
 
@@ -188,7 +188,7 @@ void Tracks::align_edits(double start, double end)
 // This doesn't affect automation or effects
        Track *master_track = 0;
        for( Track *track=first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                if( !master_track )
                        master_track = track;
                else
@@ -203,7 +203,7 @@ void Tracks::set_edit_length(double start, double end, double length)
                current_track;
                current_track = current_track->next)
        {
-               if(current_track->record)
+               if(current_track->is_armed())
                {
 #define USE_FLOATING_LENGTHS
 
@@ -344,7 +344,7 @@ void Tracks::set_transition_length(double start, double end, double length)
                current_track;
                current_track = current_track->next)
        {
-               if(current_track->record)
+               if(current_track->is_armed())
                {
                        int64_t start_units = current_track->to_units(start, 0);
                        int64_t end_units = current_track->to_units(end, 0);
@@ -399,7 +399,7 @@ void Tracks::paste_transitions(double start, double end, int track_type, char* t
 {
        int count = 0;
        for( Track *track=first; track; track=track->next ) {
-               if( !track->record || track->data_type != track_type ) continue;
+               if( !track->is_armed() || track->data_type != track_type ) continue;
                for( Edit *edit=track->edits->first;  edit; edit=edit->next ) {
                        if( !edit->is_selected ) continue;
                        edit->insert_transition(title);
@@ -412,7 +412,7 @@ void Tracks::paste_transitions(double start, double end, int track_type, char* t
        }
 
        for( Track *track=first; track; track=track->next ) {
-               if( !track->record || track->data_type != track_type ) continue;
+               if( !track->is_armed() || track->data_type != track_type ) continue;
                int64_t start_units = track->to_units(start, 0);
                int64_t end_units = track->to_units(end, 0);
                if( start_units == end_units ) {
@@ -450,7 +450,7 @@ void Tracks::set_automation_mode(double selectionstart,
 
        for(current_track = first; current_track; current_track = current_track->next)
        {
-               if(current_track->record)
+               if(current_track->is_armed())
                {
                        current_track->set_automation_mode(selectionstart,
                                selectionend,
@@ -463,7 +463,7 @@ int Tracks::clear_default_keyframe()
 {
        for(Track *current = first; current; current = NEXT)
        {
-               if(current->record)
+               if(current->is_armed())
                        current->clear_automation(0, 0, 0, 1);
        }
        return 0;
@@ -481,7 +481,7 @@ int Tracks::clear_handle(double start,
 
        for(current_track = first; current_track; current_track = current_track->next)
        {
-               if(current_track->record)
+               if(current_track->is_armed())
                {
                        current_track->clear_handle(start,
                                end,
@@ -517,7 +517,7 @@ int Tracks::copy_automation(double selectionstart,
                current_track;
                current_track = current_track->next)
        {
-               if(current_track->record)
+               if(current_track->is_armed())
                {
                        current_track->copy_automation(selectionstart,
                                selectionend,
@@ -544,22 +544,18 @@ int Tracks::delete_tracks()
 {
        int total_deleted = 0;
        int done = 0;
+       int gang = edl->session->gang_tracks != GANG_NONE ? 1 : 0;
 
-       while(!done)
-       {
+       while( !done ) {
                done = 1;
-               Track *next_track = 0;
-               for (Track* current = first; current && done; current = next_track)
-               {
-                       next_track = current->next;
-                       if(current->record)
-                       {
-                               delete_track(current);
-                               current = NULL;
-                               total_deleted++;
-                               done = 0;
-                               break;
+               for( Track* track=first, *nxt=0; done && track; track=nxt ) {
+                       nxt = track->next;
+                       if( gang ) {
+                               while( nxt && !nxt->master ) nxt = nxt->next;
                        }
+                       if( !track->is_armed() ) continue;
+                       delete_track(track);
+                       ++total_deleted;
                }
        }
        return total_deleted;
@@ -580,7 +576,7 @@ void Tracks::move_edits(ArrayList<Edit*> *in_edits, Track *track, double positio
        int current_aedit = 0, current_vedit = 0;
 //printf("Tracks::move_edits 1\n");
        for( Track *dest_track=track; dest_track; dest_track=dest_track->next ) {
-               if( !dest_track->record ) continue;
+               if( !dest_track->is_armed() ) continue;
 // Need a local copy of the source edit since the original source edit may
 // change in the editing operation.
 // Get source edit
@@ -736,7 +732,7 @@ int Tracks::concatenate_tracks(int edit_plugins, int edit_autos)
                        output_track;
                        output_track = output_track->next)
                        if(output_track->data_type == data_type &&
-                               output_track->record) break;
+                               output_track->is_armed()) break;
 
                first_output_track = output_track;
 
@@ -747,7 +743,7 @@ int Tracks::concatenate_tracks(int edit_plugins, int edit_autos)
                {
                        if(input_track->data_type == data_type &&
                                input_track->play &&
-                               !input_track->record) break;
+                               !input_track->is_armed()) break;
                }
 
 
@@ -771,7 +767,7 @@ int Tracks::concatenate_tracks(int edit_plugins, int edit_autos)
                                {
 
                                        if(input_track->data_type == data_type &&
-                                               !input_track->record &&
+                                               !input_track->is_armed() &&
                                                input_track->play) break;
                                }
 
@@ -780,7 +776,7 @@ int Tracks::concatenate_tracks(int edit_plugins, int edit_autos)
                                        output_track = output_track->next)
                                {
                                        if(output_track->data_type == data_type &&
-                                               output_track->record) break;
+                                               output_track->is_armed()) break;
                                }
 
                                if(!output_track)
@@ -832,7 +828,7 @@ int Tracks::copy(int copy_flags, double start, double end,
 // if nothing selected
        if( start == end && !all ) return 1;
        for( Track *track=first; track; track=track->next ) {
-               if( track->record || all )
+               if( track->is_armed() || all )
                        track->copy(copy_flags, start, end, file, output_path);
        }
        return 0;
@@ -842,70 +838,73 @@ int Tracks::copy(int copy_flags, double start, double end,
 
 int Tracks::move_track_up(Track *track)
 {
-       Track *next_track = track->previous;
-       if(!next_track) next_track = last;
-
-       change_modules(number_of(track), number_of(next_track), 1);
-
-// printf("Tracks::move_track_up 1 %p %p\n", track, next_track);
-// int count = 0;
-// for(Track *current = first; current && count < 5; current = NEXT, count++)
-//     printf("Tracks::move_track_up %p %p %p\n", current->previous, current, current->next);
-// printf("Tracks::move_track_up 2\n");
-//
-       swap(track, next_track);
-
-// count = 0;
-// for(Track *current = first; current && count < 5; current = NEXT, count++)
-//     printf("Tracks::move_track_up %p %p %p\n", current->previous, current, current->next);
-// printf("Tracks::move_track_up 3\n");
-
+       if( first == last ) return 1;
+       int n = 1;
+       Track *src = track, *dst = src->previous;
+       if( edl->session->gang_tracks != GANG_NONE ) {
+               while( src && !src->master ) src = src->previous;
+               if( !src ) src = first;
+               Track *nxt = src->next;
+               while( nxt && !nxt->master ) { ++n;  nxt = nxt->next; }
+               dst = src->previous;
+               while( dst && !dst->master ) { dst = dst->previous; }
+       }
+       if( src == dst ) return 1;
+       move_tracks(src, dst, n);
        return 0;
 }
 
 int Tracks::move_track_down(Track *track)
 {
-       Track *next_track = track->next;
-       if(!next_track) next_track = first;
-
-       change_modules(number_of(track), number_of(next_track), 1);
-       swap(track, next_track);
+       if( first == last ) return 1;
+       int n = 1;
+       Track *src = track, *dst = src->next;
+       if( edl->session->gang_tracks != GANG_NONE ) {
+               while( src && !src->master ) src = src->previous;
+               if( !src ) src = first;
+               Track *nxt = src->next;
+               while( nxt && !nxt->master ) { ++n;  nxt = nxt->next; }
+               if( nxt ) {
+                       nxt = nxt->next;
+                       while( nxt && !nxt->master ) { nxt = nxt->next; }
+               }
+               else
+                       nxt = first;
+               dst = nxt;
+       }
+       else
+               dst = !dst ? first : dst->next;
+       if( src == dst ) return 1;
+       move_tracks(src, dst, n);
        return 0;
 }
 
 
 int Tracks::move_tracks_up()
 {
-       int result = 0;
-       Track *next = first;
-       while( next ) {
-               Track *track = next;  next = track->next;
-               if( !track->record ) continue;
-               if( track->previous ) {
-                       change_modules(number_of(track->previous), number_of(track), 1);
-                       swap(track->previous, track);
-                       result = 1;
-               }
+       if( first == last ) return 1;
+       int n = 1;
+       Track *src = first, *dst = 0;
+       if( edl->session->gang_tracks != GANG_NONE ) {
+               Track *nxt = src->next;
+               while( nxt && !nxt->master ) { ++n;  nxt = nxt->next; }
        }
-
-       return result;
+       if( src == dst ) return 1;
+       move_tracks(src, dst, n);
+       return 0;
 }
 
 int Tracks::move_tracks_down()
 {
-       int result = 0;
-       Track *prev = last;
-       while( prev ) {
-               Track *track = prev;  prev = track->previous;
-               if( !track->record ) continue;
-               if( track->next ) {
-                       change_modules(number_of(track), number_of(track->next), 1);
-                       swap(track, track->next);
-                       result = 1;
-               }
+       if( first == last ) return 1;
+       int n = 1;
+       Track *src = last, *dst = first;
+       if( edl->session->gang_tracks != GANG_NONE ) {
+               while( src && !src->master ) { ++n;  src = src->previous; }
        }
-
-       return result;
+       if( src == dst ) return 1;
+       move_tracks(src, dst, n);
+       return 0;
 }
 
 
@@ -914,7 +913,7 @@ void Tracks::paste_audio_transition(PluginServer *server)
        for(Track *current = first; current; current = NEXT)
        {
                if(current->data_type == TRACK_AUDIO &&
-                       current->record)
+                       current->is_armed())
                {
                        int64_t position = current->to_units(
                                edl->local_session->get_selectionstart(), 0);
@@ -992,7 +991,7 @@ void Tracks::paste_automation(double selectionstart,
                                        if(typeless)
                                        {
                                                if(!current_track) current_track = first;
-                                               while(current_track && !current_track->record)
+                                               while(current_track && !current_track->is_armed())
                                                        current_track = current_track->next;
                                                dst_track = current_track;
                                        }
@@ -1007,7 +1006,7 @@ void Tracks::paste_automation(double selectionstart,
 
                                                while(current_atrack &&
                                                        (current_atrack->data_type != TRACK_AUDIO ||
-                                                       !current_atrack->record))
+                                                       !current_atrack->is_armed()))
                                                        current_atrack = current_atrack->next;
                                                dst_track = current_atrack;
                                        }
@@ -1021,7 +1020,7 @@ void Tracks::paste_automation(double selectionstart,
 
                                                while(current_vtrack &&
                                                        (current_vtrack->data_type != TRACK_VIDEO ||
-                                                       !current_vtrack->record))
+                                                       !current_vtrack->is_armed()))
                                                        current_vtrack = current_vtrack->next;
 
                                                dst_track = current_vtrack;
@@ -1068,7 +1067,7 @@ void Tracks::paste_video_transition(PluginServer *server, int first_track)
        for(Track *current = first; current; current = NEXT)
        {
                if(current->data_type == TRACK_VIDEO &&
-                       current->record)
+                       current->is_armed())
                {
                        int64_t position = current->to_units(
                                edl->local_session->get_selectionstart(), 0);
@@ -1101,7 +1100,7 @@ int Tracks::paste_silence(double start,
                current_track;
                current_track = current_track->next)
        {
-               if(current_track->record)
+               if(current_track->is_armed())
                {
                        current_track->paste_silence(start,
                                end,
@@ -1137,7 +1136,7 @@ int Tracks::modify_edithandles(double &oldposition, double &newposition,
        int edit_plugins, int edit_autos, int group_id)
 {
        for( Track *track=first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                track->modify_edithandles(oldposition, newposition,
                        currentend, handle_mode, edit_labels,
                        edit_plugins, edit_autos, group_id);
@@ -1152,7 +1151,7 @@ int Tracks::modify_pluginhandles(double &oldposition, double &newposition,
        int edit_autos, Edits *trim_edits)
 {
        for( Track *track=first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                track->modify_pluginhandles(oldposition, newposition,
                        currentend, handle_mode, edit_labels,
                        edit_autos, trim_edits);
@@ -1193,7 +1192,7 @@ int Tracks::scale_time(float rate_scale, int ignore_record, int scale_edits, int
                current_track;
                current_track = current_track->next)
        {
-               if((current_track->record || ignore_record) &&
+               if((current_track->is_armed() || ignore_record) &&
                        current_track->data_type == TRACK_VIDEO)
                {
                        current_track->scale_time(rate_scale, scale_edits, scale_autos, start, end);
index a2c2ca7c1485d5ddd35dd077256bb2fae449fdc1..73a4653aec4b3c0f94fc6ed7899d2c34a599dbd9 100644 (file)
@@ -167,7 +167,7 @@ void VPatchGUI::update_faders(float v)
        float change = v - current->get_value();
        current->set_value(v);
 
-       if( track->gang && track->record )
+       if( track->is_ganged() && track->is_armed() )
                patchbay->synchronize_faders(change, TRACK_AUDIO, track);
        mwindow->undo->update_undo_after(_("fade"), LOAD_AUTOMATION);
        change_source = 0;
index 25404f32f2f597c1169fb0bbc31ad7a6a0ba2ae3..1217633f0cdb4fd9a0896c15a97e07a1292094ed 100644 (file)
@@ -558,7 +558,8 @@ VWindowEditing::VWindowEditing(MWindow *mwindow, VWindow *vwindow)
                0, // use_commerical
                0, // use_goto
                1, // use_clk2play
-               1) // use_scope
+               1, // use_scope
+               0) // use_gang_tracks
 {
        this->mwindow = mwindow;
        this->vwindow = vwindow;
@@ -703,6 +704,7 @@ void VWindowEditing::panel_set_editing_mode(int mode) {}
 void VWindowEditing::panel_set_auto_keyframes(int v) {}
 void VWindowEditing::panel_set_span_keyframes(int v) {}
 void VWindowEditing::panel_set_labels_follow_edits(int v) {}
+void VWindowEditing::panel_set_gang_tracks(int v) {}
 
 
 VWindowSource::VWindowSource(MWindow *mwindow, VWindowGUI *vwindow, int x, int y)
index d4c395f70b7b92f9879291a9a624021c113ba8ee..d2527acde203e6a98a5c9f53f46a8c25925f2ad2 100644 (file)
@@ -158,6 +158,7 @@ public:
        void panel_set_auto_keyframes(int v);
        void panel_set_span_keyframes(int v);
        void panel_set_labels_follow_edits(int v);
+       void panel_set_gang_tracks(int v);
 
        MWindow *mwindow;
        VWindow *vwindow;
index 5b547db9648cfbba26726bef0b6c161545a3007a..343f7f5c57efdc1228f659818ac2300307587a9d 100644 (file)
                <td align="left"><font face="Liberation Serif" size=4>Ctrl-alt</font></td>
                <td align="left"><font face="Liberation Serif" size=4>Increase all auto curve limits</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>UP (up arrow)</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Shift</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Move all tracks up by 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>DOWN arrow</font></td>
                <td align="left"><font face="Liberation Serif" size=4>Ctrl-alt</font></td>
                <td align="left"><font face="Liberation Serif" size=4>Decrease all auto curve limits</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>DOWN arrow</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Shift</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Move all tracks down by 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>PGUP (page up)</font></td>
index 7a54ee9bb1a5e0c43005690559083fbf43a861c1..52434590766849483c677e731520787c307452a7 100644 (file)
@@ -661,6 +661,14 @@ void BlondTheme::initialize()
                "patch_checkedhi.png",
                "drawpatch_data");
 
+       new_toggle("masterpatch.png",
+               "patch_up.png",
+               "patch_hi.png",
+               "patch_checked.png",
+               "patch_dn.png",
+               "patch_checkedhi.png",
+               "masterpatch_data");
+
 
        new_image_set("mutepatch_data",
                5,
@@ -898,6 +906,9 @@ void BlondTheme::initialize()
                   new_image("locklabels_dn.png"), // can't have seperate down for each!!??
                   new_image("locklabels_unlockedhi.png"),
                   "locklabels");
+       new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
+       new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
+       new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
 
        VFrame *cpanel_up = new_image("cpanel_up.png");
        VFrame *cpanel_hi = new_image("cpanel_hi.png");
diff --git a/cinelerra-5.1/plugins/theme_blond/data/gang0.png b/cinelerra-5.1/plugins/theme_blond/data/gang0.png
new file mode 100644 (file)
index 0000000..9825bbc
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/gang0.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/gang1.png b/cinelerra-5.1/plugins/theme_blond/data/gang1.png
new file mode 100644 (file)
index 0000000..ac65809
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/gang1.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/gang2.png b/cinelerra-5.1/plugins/theme_blond/data/gang2.png
new file mode 100644 (file)
index 0000000..483afee
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/gang2.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/masterpatch.png b/cinelerra-5.1/plugins/theme_blond/data/masterpatch.png
new file mode 100644 (file)
index 0000000..a955d18
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/masterpatch.png differ
index 81a23cdc1839e76c35f3d426a9008928d46add27..454864ab61819c2bddc59999e88c2e6477ae5344 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_blond/data/patchbay_bg.png and b/cinelerra-5.1/plugins/theme_blond/data/patchbay_bg.png differ
index 258b9e5b09e17e3efc8dfcca44520bcbfa5160e6..6db8b722f4ee49a75d771acde1ddb32a193b4bcc 100644 (file)
@@ -915,6 +915,9 @@ void BlondCVTheme::initialize()
        //show_meters = new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
        //titlesafe_data = new_toggle("titlesafe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
        //tool_data = new_toggle("toolwindow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi);
+       new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
+       new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
+       new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
        new_toggle("eyedrop.png",
                editpanel_up,
                editpanel_hi,
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/gang0.png b/cinelerra-5.1/plugins/theme_blond_cv/data/gang0.png
new file mode 100644 (file)
index 0000000..b44809c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/gang0.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/gang1.png b/cinelerra-5.1/plugins/theme_blond_cv/data/gang1.png
new file mode 100644 (file)
index 0000000..e3bbd85
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/gang1.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/gang2.png b/cinelerra-5.1/plugins/theme_blond_cv/data/gang2.png
new file mode 100644 (file)
index 0000000..4d99ae1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/gang2.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/masterpatch.png b/cinelerra-5.1/plugins/theme_blond_cv/data/masterpatch.png
new file mode 100644 (file)
index 0000000..a955d18
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/masterpatch.png differ
index 132badcdbe5e4d83a0acd567ec1da743678669a4..57ca4936c5a7d523fe69f9c7e9975516276994ba 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_blond_cv/data/patchbay_bg.png and b/cinelerra-5.1/plugins/theme_blond_cv/data/patchbay_bg.png differ
index 7b47576b614b8a5477691780a6cf57e98f2ffbcc..b589e0e325af001b08a69d252ffe459df689d99f 100644 (file)
@@ -660,6 +660,14 @@ void BlueDotTheme::initialize()
                "patch_checkedhi.png",
                "drawpatch_data");
 
+       new_toggle("masterpatch.png",
+               "patch_up.png",
+               "patch_hi.png",
+               "patch_checked.png",
+               "patch_dn.png",
+               "patch_checkedhi.png",
+               "masterpatch_data");
+
 
        new_image_set("mutepatch_data",
                5,
@@ -896,6 +904,9 @@ void BlueDotTheme::initialize()
                   new_image("locklabels_dn.png"), // can't have seperate down for each!!??
                   new_image("locklabels_unlockedhi.png"),
                   "locklabels");
+       new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
+       new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
+       new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
 
        VFrame *cpanel_up = new_image("cpanel_up.png");
        VFrame *cpanel_hi = new_image("cpanel_hi.png");
diff --git a/cinelerra-5.1/plugins/theme_blue/data/gang0.png b/cinelerra-5.1/plugins/theme_blue/data/gang0.png
new file mode 100644 (file)
index 0000000..9825bbc
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/gang0.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/gang1.png b/cinelerra-5.1/plugins/theme_blue/data/gang1.png
new file mode 100644 (file)
index 0000000..ac65809
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/gang1.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/gang2.png b/cinelerra-5.1/plugins/theme_blue/data/gang2.png
new file mode 100644 (file)
index 0000000..483afee
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/gang2.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/masterpatch.png b/cinelerra-5.1/plugins/theme_blue/data/masterpatch.png
new file mode 100644 (file)
index 0000000..a955d18
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/masterpatch.png differ
index 114e9bd63c6ff68c82415152fe562f35741484b9..26719c86faf294a6b0b5830416f47746ad0fea23 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_blue/data/patchbay_bg.png and b/cinelerra-5.1/plugins/theme_blue/data/patchbay_bg.png differ
index 8255adc0cb8b48b9aeabae7241893f50dae06917..3d000749d7d74c877c008a3faf0c97f1a6ba4c99 100644 (file)
@@ -697,6 +697,14 @@ void BlueDotTheme::initialize()
                "drawpatch_dn.png",
                "drawpatch_checkedhi.png");
 
+       new_toggle("masterpatch.png",
+               "patch_up.png",
+               "patch_hi.png",
+               "patch_checked.png",
+               "patch_dn.png",
+               "patch_checkedhi.png",
+               "masterpatch_data");
+
 
        new_image_set("mutepatch_data",
                5,
@@ -939,6 +947,9 @@ void BlueDotTheme::initialize()
                   new_image("locklabels_dn.png"), // can't have seperate down for each!!??
                   new_image("locklabels_unlockedhi.png"),
                   "locklabels");
+       new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
+       new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
+       new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
 
 //Is that necessary??
        VFrame *cpanel_up = new_image("editpanel_up.png");
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/gang0.png b/cinelerra-5.1/plugins/theme_blue_dot/data/gang0.png
new file mode 100644 (file)
index 0000000..2aef30e
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/gang0.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/gang1.png b/cinelerra-5.1/plugins/theme_blue_dot/data/gang1.png
new file mode 100644 (file)
index 0000000..8bfbdf4
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/gang1.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/gang2.png b/cinelerra-5.1/plugins/theme_blue_dot/data/gang2.png
new file mode 100644 (file)
index 0000000..a2346a1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/gang2.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/masterpatch.png b/cinelerra-5.1/plugins/theme_blue_dot/data/masterpatch.png
new file mode 100644 (file)
index 0000000..a955d18
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/masterpatch.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/patch_checked.png b/cinelerra-5.1/plugins/theme_blue_dot/data/patch_checked.png
new file mode 100644 (file)
index 0000000..445f56e
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/patch_checked.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/patch_checkedhi.png b/cinelerra-5.1/plugins/theme_blue_dot/data/patch_checkedhi.png
new file mode 100644 (file)
index 0000000..061d608
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/patch_checkedhi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/patch_dn.png b/cinelerra-5.1/plugins/theme_blue_dot/data/patch_dn.png
new file mode 100644 (file)
index 0000000..8cfd786
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/patch_dn.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/patch_hi.png b/cinelerra-5.1/plugins/theme_blue_dot/data/patch_hi.png
new file mode 100644 (file)
index 0000000..73971b0
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/patch_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/patch_up.png b/cinelerra-5.1/plugins/theme_blue_dot/data/patch_up.png
new file mode 100644 (file)
index 0000000..e8c8566
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/patch_up.png differ
index de5f7992627214f9f34ee631c401f22d8384c961..2263e10915de4c890f6855555ef732195a3b8340 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_blue_dot/data/patchbay_bg.png and b/cinelerra-5.1/plugins/theme_blue_dot/data/patchbay_bg.png differ
index fdce3ce0d82e93c471e0b66e989f2a853599b95e..6c8afa05e0358118d136c11fa42ca17337286452 100644 (file)
@@ -664,6 +664,14 @@ void BrightTheme::initialize()
                "patch_checkedhi.png",
                "drawpatch_data");
 
+       new_toggle("masterpatch.png",
+               "patch_up.png",
+               "patch_hi.png",
+               "patch_checked.png",
+               "patch_dn.png",
+               "patch_checkedhi.png",
+               "masterpatch_data");
+
 
        new_image_set("mutepatch_data",
                5,
@@ -894,6 +902,9 @@ void BrightTheme::initialize()
                   new_image("locklabels_dn.png"), // can't have seperate down for each!!??
                   new_image("locklabels_unlockedhi.png"),
                   "locklabels");
+       new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
+       new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
+       new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
 
        VFrame *cpanel_up = new_image("cpanel_up.png");
        VFrame *cpanel_hi = new_image("cpanel_hi.png");
diff --git a/cinelerra-5.1/plugins/theme_bright/data/gang0.png b/cinelerra-5.1/plugins/theme_bright/data/gang0.png
new file mode 100644 (file)
index 0000000..b5f7e27
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/gang0.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/gang1.png b/cinelerra-5.1/plugins/theme_bright/data/gang1.png
new file mode 100644 (file)
index 0000000..70c3bdb
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/gang1.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/gang2.png b/cinelerra-5.1/plugins/theme_bright/data/gang2.png
new file mode 100644 (file)
index 0000000..cdcc5c1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/gang2.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/masterpatch.png b/cinelerra-5.1/plugins/theme_bright/data/masterpatch.png
new file mode 100644 (file)
index 0000000..a955d18
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/masterpatch.png differ
index 72d342dd96f077c61a5898f5844ac302586c281d..e8d3c5b5a3fb1aa4609c2306acee818b2d7682b9 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_bright/data/patchbay_bg.png and b/cinelerra-5.1/plugins/theme_bright/data/patchbay_bg.png differ
index c44ef502051298f94ea4670f73187ed349d0daac..22d2d554cb76893cbb7187c3755ad958588d735c 100644 (file)
@@ -674,6 +674,14 @@ void CAKEWALKTHEME::initialize()
       "patch_dn.png",
       "patch_checkedhi.png",
       "drawpatch_data");
+ new_toggle("masterpatch.png",
+      "patch_up.png",
+      "patch_hi.png",
+      "patch_checked.png",
+      "patch_dn.png",
+      "patch_checkedhi.png",
+      "masterpatch_data");
+
  new_image_set("mutepatch_data",
       5,
       "mutepatch_up.png",
@@ -985,6 +993,18 @@ void CAKEWALKTHEME::initialize()
       new_image("locklabels_dn.png"),
       new_image("locklabels_unlockedhi.png"),
       "locklabels");
+ new_toggle("gang0.png",
+      editpanel_up, editpanel_hi, editpanel_checked,
+      editpanel_dn, editpanel_checkedhi,
+      "gang0");
+ new_toggle("gang1.png",
+      editpanel_up, editpanel_hi, editpanel_checked,
+      editpanel_dn, editpanel_checkedhi,
+      "gang1");
+ new_toggle("gang2.png",
+      editpanel_up, editpanel_hi, editpanel_checked,
+      editpanel_dn, editpanel_checkedhi,
+      "gang2");
  VFrame *cpanel_up = new_image("cpanel_up.png");
  VFrame *cpanel_hi = new_image("cpanel_hi.png");
  VFrame *cpanel_dn = new_image("cpanel_dn.png");
diff --git a/cinelerra-5.1/plugins/theme_cakewalk/data/gang0.png b/cinelerra-5.1/plugins/theme_cakewalk/data/gang0.png
new file mode 100644 (file)
index 0000000..9825bbc
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_cakewalk/data/gang0.png differ
diff --git a/cinelerra-5.1/plugins/theme_cakewalk/data/gang1.png b/cinelerra-5.1/plugins/theme_cakewalk/data/gang1.png
new file mode 100644 (file)
index 0000000..ac65809
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_cakewalk/data/gang1.png differ
diff --git a/cinelerra-5.1/plugins/theme_cakewalk/data/gang2.png b/cinelerra-5.1/plugins/theme_cakewalk/data/gang2.png
new file mode 100644 (file)
index 0000000..483afee
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_cakewalk/data/gang2.png differ
diff --git a/cinelerra-5.1/plugins/theme_cakewalk/data/masterpatch.png b/cinelerra-5.1/plugins/theme_cakewalk/data/masterpatch.png
new file mode 100644 (file)
index 0000000..a955d18
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_cakewalk/data/masterpatch.png differ
index 8730109e9e39b71dc8c71445a935d8530501a7fb..45efa45ca7fc1216c986739fcc8a4607c7f7e833 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_cakewalk/data/patchbay_bg.png and b/cinelerra-5.1/plugins/theme_cakewalk/data/patchbay_bg.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/gang0.png b/cinelerra-5.1/plugins/theme_hulk/data/gang0.png
new file mode 100644 (file)
index 0000000..82b37a8
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/gang0.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/gang1.png b/cinelerra-5.1/plugins/theme_hulk/data/gang1.png
new file mode 100644 (file)
index 0000000..a99c626
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/gang1.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/gang2.png b/cinelerra-5.1/plugins/theme_hulk/data/gang2.png
new file mode 100644 (file)
index 0000000..f6738f0
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/gang2.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/masterpatch.png b/cinelerra-5.1/plugins/theme_hulk/data/masterpatch.png
new file mode 100644 (file)
index 0000000..a955d18
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/masterpatch.png differ
index b4f2ac2863c33e391790edb22e868016eb6b07e4..036bce927ff4e0171e24f172f22ec82899a395f9 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_hulk/data/patchbay_bg.png and b/cinelerra-5.1/plugins/theme_hulk/data/patchbay_bg.png differ
index 3a9971f6494825746cdb045b0fa0fc66f1db9ca0..e9b216fe4ed6d0da57c4ce727d650289b3ea2579 100644 (file)
@@ -658,6 +658,14 @@ void HULKTHEME::initialize()
                "patch_checkedhi.png",
                "drawpatch_data");
 
+       new_toggle("masterpatch.png",
+               "patch_up.png",
+               "patch_hi.png",
+               "patch_checked.png",
+               "patch_dn.png",
+               "patch_checkedhi.png",
+               "masterpatch_data");
+
 
        new_image_set("mutepatch_data",
                5,
@@ -895,6 +903,9 @@ void HULKTHEME::initialize()
                   new_image("locklabels_dn.png"), // can't have seperate down for each!!??
                   new_image("locklabels_unlockedhi.png"),
                   "locklabels");
+       new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
+       new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
+       new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
 
        VFrame *cpanel_up = new_image("cpanel_up.png");
        VFrame *cpanel_hi = new_image("cpanel_hi.png");
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/gang0.png b/cinelerra-5.1/plugins/theme_neophyte/data/gang0.png
new file mode 100644 (file)
index 0000000..9825bbc
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/gang0.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/gang1.png b/cinelerra-5.1/plugins/theme_neophyte/data/gang1.png
new file mode 100644 (file)
index 0000000..ac65809
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/gang1.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/gang2.png b/cinelerra-5.1/plugins/theme_neophyte/data/gang2.png
new file mode 100644 (file)
index 0000000..483afee
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/gang2.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/masterpatch.png b/cinelerra-5.1/plugins/theme_neophyte/data/masterpatch.png
new file mode 100644 (file)
index 0000000..a955d18
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/masterpatch.png differ
index 49b3086fc45b6c334fc4eb4844eec1b1aea601fd..3424989fa24ebce6c141b41737f370d3695eb318 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_neophyte/data/patchbay_bg.png and b/cinelerra-5.1/plugins/theme_neophyte/data/patchbay_bg.png differ
index 450adef75766b070f306c77767cf78d53b4e07b8..e58d2c049f2f92f4fd30b968ee15c7b0854a8613 100644 (file)
@@ -813,6 +813,14 @@ void NEOPHYTETHEME::initialize()
                           "patch_checkedhi.png",
                           "drawpatch_data");
 
+       new_toggle("masterpatch.png",
+                          "patch_up.png",
+                          "patch_hi.png",
+                          "patch_checked.png",
+                          "patch_dn.png",
+                          "patch_checkedhi.png",
+                          "masterpatch_data");
+
        new_image_set("mutepatch_data",
                                  5,
                                  "mutepatch_up.png",
@@ -1135,6 +1143,18 @@ void NEOPHYTETHEME::initialize()
                           new_image("locklabels_dn.png"), // can't have seperate down for each!!??
                           new_image("locklabels_unlockedhi.png"),
                           "locklabels");
+       new_toggle("gang0.png",
+                          editpanel_up, editpanel_hi, editpanel_checked,
+                          editpanel_dn, editpanel_checkedhi,
+                          "gang0");
+       new_toggle("gang1.png",
+                          editpanel_up, editpanel_hi, editpanel_checked,
+                          editpanel_dn, editpanel_checkedhi,
+                          "gang1");
+       new_toggle("gang2.png",
+                          editpanel_up, editpanel_hi, editpanel_checked,
+                          editpanel_dn, editpanel_checkedhi,
+                          "gang2");
 
        VFrame *cpanel_up = new_image("cpanel_up.png");
        VFrame *cpanel_hi = new_image("cpanel_hi.png");
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/gang0.png b/cinelerra-5.1/plugins/theme_pinklady/data/gang0.png
new file mode 100644 (file)
index 0000000..9825bbc
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/gang0.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/gang1.png b/cinelerra-5.1/plugins/theme_pinklady/data/gang1.png
new file mode 100644 (file)
index 0000000..ac65809
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/gang1.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/gang2.png b/cinelerra-5.1/plugins/theme_pinklady/data/gang2.png
new file mode 100644 (file)
index 0000000..483afee
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/gang2.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/masterpatch.png b/cinelerra-5.1/plugins/theme_pinklady/data/masterpatch.png
new file mode 100644 (file)
index 0000000..a955d18
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/masterpatch.png differ
index bc7ba4256cae4022c09e7cd7150750ae6cc9b8c7..93c3dfcff9694c4386ecdd7ff7156ac607463b33 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_pinklady/data/patchbay_bg.png and b/cinelerra-5.1/plugins/theme_pinklady/data/patchbay_bg.png differ
index e07369fd6034c774a3ac8300eb0a83d66ed6745b..db4ed973b6d8fb121b0ad3290e9bbdf1b91e953d 100644 (file)
@@ -658,6 +658,14 @@ void PINKLADY::initialize()
                "patch_checkedhi.png",
                "drawpatch_data");
 
+       new_toggle("masterpatch.png",
+               "patch_up.png",
+               "patch_hi.png",
+               "patch_checked.png",
+               "patch_dn.png",
+               "patch_checkedhi.png",
+               "masterpatch_data");
+
 
        new_image_set("mutepatch_data",
                5,
@@ -895,6 +903,9 @@ void PINKLADY::initialize()
                   new_image("locklabels_dn.png"), // can't have seperate down for each!!??
                   new_image("locklabels_unlockedhi.png"),
                   "locklabels");
+       new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
+       new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
+       new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
 
        VFrame *cpanel_up = new_image("cpanel_up.png");
        VFrame *cpanel_hi = new_image("cpanel_hi.png");
diff --git a/cinelerra-5.1/plugins/theme_suv/data/gang0.png b/cinelerra-5.1/plugins/theme_suv/data/gang0.png
new file mode 100644 (file)
index 0000000..9825bbc
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/gang0.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/gang1.png b/cinelerra-5.1/plugins/theme_suv/data/gang1.png
new file mode 100644 (file)
index 0000000..ac65809
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/gang1.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/gang2.png b/cinelerra-5.1/plugins/theme_suv/data/gang2.png
new file mode 100644 (file)
index 0000000..483afee
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/gang2.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/masterpatch.png b/cinelerra-5.1/plugins/theme_suv/data/masterpatch.png
new file mode 100644 (file)
index 0000000..a955d18
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/masterpatch.png differ
index 475e5f14c2128ee4ef0d88871551d83a6ae50997..8465b70753893aba34b88a71af97867f03e3b37e 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_suv/data/patchbay_bg.png and b/cinelerra-5.1/plugins/theme_suv/data/patchbay_bg.png differ
index 2b3700b89d1da62bf854956a68be8ad37a4b5001..2b20a62ec42b1e0229c3519a7ead8047f37173dd 100644 (file)
@@ -646,6 +646,13 @@ void SUV::initialize()
                "patch_checkedhi.png",
                "drawpatch_data");
 
+       new_toggle("masterpatch.png",
+               "patch_up.png",
+               "patch_hi.png",
+               "patch_checked.png",
+               "patch_dn.png",
+               "patch_checkedhi.png",
+               "masterpatch_data");
 
        new_image_set("mutepatch_data",
                5,
@@ -883,6 +890,9 @@ void SUV::initialize()
                   new_image("locklabels_dn.png"), // can't have seperate down for each!!??
                   new_image("locklabels_unlockedhi.png"),
                   "locklabels");
+       new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
+       new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
+       new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
 
        VFrame *cpanel_up = new_image("cpanel_up.png");
        VFrame *cpanel_hi = new_image("cpanel_hi.png");
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/gang0.png b/cinelerra-5.1/plugins/theme_unflat/data/gang0.png
new file mode 100644 (file)
index 0000000..9825bbc
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/gang0.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/gang1.png b/cinelerra-5.1/plugins/theme_unflat/data/gang1.png
new file mode 100644 (file)
index 0000000..ac65809
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/gang1.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/gang2.png b/cinelerra-5.1/plugins/theme_unflat/data/gang2.png
new file mode 100644 (file)
index 0000000..483afee
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/gang2.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/masterpatch.png b/cinelerra-5.1/plugins/theme_unflat/data/masterpatch.png
new file mode 100644 (file)
index 0000000..a955d18
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/masterpatch.png differ
index f05dc74e282c3ac25fb637bfa3ec854bbfed1bbb..9f245ef5cfbaee640319be97d83dd6298c93e32b 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_unflat/data/patchbay_bg.png and b/cinelerra-5.1/plugins/theme_unflat/data/patchbay_bg.png differ
index 82a8e8157a65dd31156d2c32fec1b7534850dddb..4a09eb82573242086f84acad14f32403deca3ea0 100644 (file)
@@ -659,6 +659,14 @@ void UNFLATTHEME::initialize()
                "patch_checkedhi.png",
                "drawpatch_data");
 
+       new_toggle("masterpatch.png",
+               "patch_up.png",
+               "patch_hi.png",
+               "patch_checked.png",
+               "patch_dn.png",
+               "patch_checkedhi.png",
+               "masterpatch_data");
+
 
        new_image_set("mutepatch_data",
                5,
@@ -890,6 +898,9 @@ void UNFLATTHEME::initialize()
                   new_image("locklabels_dn.png"), // can't have seperate down for each!!??
                   new_image("locklabels_unlockedhi.png"),
                   "locklabels");
+       new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
+       new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
+       new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
 
        VFrame *cpanel_up = new_image("cpanel_up.png");
        VFrame *cpanel_hi = new_image("cpanel_hi.png");