From: Good Guy Date: Thu, 25 Jun 2020 01:56:50 +0000 (-0600) Subject: add master/armed_gang track operations, tweak appearanceprefs layout, fix vicon video... X-Git-Tag: 2020-06~5 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=48a6854a1ca58aa291ffc6fe3a48807492dfbef7;p=goodguy%2Fcinelerra.git add master/armed_gang track operations, tweak appearanceprefs layout, fix vicon video/cache errors, fix show window deadlocks --- diff --git a/cinelerra-5.1/cinelerra/apatchgui.C b/cinelerra-5.1/cinelerra/apatchgui.C index 0e8adca2..59d18244 100644 --- a/cinelerra-5.1/cinelerra/apatchgui.C +++ b/cinelerra-5.1/cinelerra/apatchgui.C @@ -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; diff --git a/cinelerra-5.1/cinelerra/appearanceprefs.C b/cinelerra-5.1/cinelerra/appearanceprefs.C index cb0279af..1c6be931 100644 --- a/cinelerra-5.1/cinelerra/appearanceprefs.C +++ b/cinelerra-5.1/cinelerra/appearanceprefs.C @@ -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; diff --git a/cinelerra-5.1/cinelerra/appearanceprefs.h b/cinelerra-5.1/cinelerra/appearanceprefs.h index 8c3ddaec..e7ef3426 100644 --- a/cinelerra-5.1/cinelerra/appearanceprefs.h +++ b/cinelerra-5.1/cinelerra/appearanceprefs.h @@ -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(); diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index b74a0a7c..33e3cbc8 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -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; diff --git a/cinelerra-5.1/cinelerra/bdcreate.C b/cinelerra-5.1/cinelerra/bdcreate.C index f13642c8..93794d51 100644 --- a/cinelerra-5.1/cinelerra/bdcreate.C +++ b/cinelerra-5.1/cinelerra/bdcreate.C @@ -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; diff --git a/cinelerra-5.1/cinelerra/cwindow.C b/cinelerra-5.1/cinelerra/cwindow.C index 43281623..5c2ed207 100644 --- a/cinelerra-5.1/cinelerra/cwindow.C +++ b/cinelerra-5.1/cinelerra/cwindow.C @@ -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; } diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index 97ee1ceb..7f5ddf5f 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -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, diff --git a/cinelerra-5.1/cinelerra/cwindowgui.h b/cinelerra-5.1/cinelerra/cwindowgui.h index df1e01c8..0d79d870 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.h +++ b/cinelerra-5.1/cinelerra/cwindowgui.h @@ -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; diff --git a/cinelerra-5.1/cinelerra/cwindowtool.C b/cinelerra-5.1/cinelerra/cwindowtool.C index f3fd68e3..55d64b45 100644 --- a/cinelerra-5.1/cinelerra/cwindowtool.C +++ b/cinelerra-5.1/cinelerra/cwindowtool.C @@ -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 && imasks.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(); diff --git a/cinelerra-5.1/cinelerra/dvdcreate.C b/cinelerra-5.1/cinelerra/dvdcreate.C index adeb8df5..4c8ab188 100644 --- a/cinelerra-5.1/cinelerra/dvdcreate.C +++ b/cinelerra-5.1/cinelerra/dvdcreate.C @@ -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; diff --git a/cinelerra-5.1/cinelerra/edit.C b/cinelerra-5.1/cinelerra/edit.C index f06194f8..f32d1c15 100644 --- a/cinelerra-5.1/cinelerra/edit.C +++ b/cinelerra-5.1/cinelerra/edit.C @@ -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; diff --git a/cinelerra-5.1/cinelerra/edit.h b/cinelerra-5.1/cinelerra/edit.h index 290bf63e..95dff778 100644 --- a/cinelerra-5.1/cinelerra/edit.h +++ b/cinelerra-5.1/cinelerra/edit.h @@ -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. diff --git a/cinelerra-5.1/cinelerra/editlength.C b/cinelerra-5.1/cinelerra/editlength.C index 188d415a..070681e8 100644 --- a/cinelerra-5.1/cinelerra/editlength.C +++ b/cinelerra-5.1/cinelerra/editlength.C @@ -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); diff --git a/cinelerra-5.1/cinelerra/editpanel.C b/cinelerra-5.1/cinelerra/editpanel.C index 11e1fc5c..4d3f366b 100644 --- a/cinelerra-5.1/cinelerra/editpanel.C +++ b/cinelerra-5.1/cinelerra/editpanel.C @@ -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; +} + diff --git a/cinelerra-5.1/cinelerra/editpanel.h b/cinelerra-5.1/cinelerra/editpanel.h index b81d9fed..a8104612 100644 --- a/cinelerra-5.1/cinelerra/editpanel.h +++ b/cinelerra-5.1/cinelerra/editpanel.h @@ -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; diff --git a/cinelerra-5.1/cinelerra/editpanel.inc b/cinelerra-5.1/cinelerra/editpanel.inc index f9910135..5b24a831 100644 --- a/cinelerra-5.1/cinelerra/editpanel.inc +++ b/cinelerra-5.1/cinelerra/editpanel.inc @@ -57,5 +57,6 @@ class LockLabelsButton; class EditPanelScopeGUI; class EditPanelScopeDialog; class EditPanelScope; +class EditPanelMashMixers; #endif diff --git a/cinelerra-5.1/cinelerra/edl.C b/cinelerra-5.1/cinelerra/edl.C index 130f80bb..5df16099 100644 --- a/cinelerra-5.1/cinelerra/edl.C +++ b/cinelerra-5.1/cinelerra/edl.C @@ -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 && vtrackrecord || 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; iplugin_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; diff --git a/cinelerra-5.1/cinelerra/edlsession.C b/cinelerra-5.1/cinelerra/edlsession.C index 90a5319c..74eb3471 100644 --- a/cinelerra-5.1/cinelerra/edlsession.C +++ b/cinelerra-5.1/cinelerra/edlsession.C @@ -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; diff --git a/cinelerra-5.1/cinelerra/edlsession.h b/cinelerra-5.1/cinelerra/edlsession.h index aa74a1da..b2994f18 100644 --- a/cinelerra-5.1/cinelerra/edlsession.h +++ b/cinelerra-5.1/cinelerra/edlsession.h @@ -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 diff --git a/cinelerra-5.1/cinelerra/edlsession.inc b/cinelerra-5.1/cinelerra/edlsession.inc index 6b4b5a05..da9cac9c 100644 --- a/cinelerra-5.1/cinelerra/edlsession.inc +++ b/cinelerra-5.1/cinelerra/edlsession.inc @@ -24,6 +24,10 @@ #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; diff --git a/cinelerra-5.1/cinelerra/keyframepopup.C b/cinelerra-5.1/cinelerra/keyframepopup.C index 859ae16c..7457773a 100644 --- a/cinelerra-5.1/cinelerra/keyframepopup.C +++ b/cinelerra-5.1/cinelerra/keyframepopup.C @@ -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); diff --git a/cinelerra-5.1/cinelerra/mainmenu.C b/cinelerra-5.1/cinelerra/mainmenu.C index 6fc329b6..0ec9cf67 100644 --- a/cinelerra-5.1/cinelerra/mainmenu.C +++ b/cinelerra-5.1/cinelerra/mainmenu.C @@ -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; } diff --git a/cinelerra-5.1/cinelerra/mbuttons.C b/cinelerra-5.1/cinelerra/mbuttons.C index b863a313..d40b726d 100644 --- a/cinelerra-5.1/cinelerra/mbuttons.C +++ b/cinelerra-5.1/cinelerra/mbuttons.C @@ -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); +} + diff --git a/cinelerra-5.1/cinelerra/mbuttons.h b/cinelerra-5.1/cinelerra/mbuttons.h index 698c4e83..dad5847f 100644 --- a/cinelerra-5.1/cinelerra/mbuttons.h +++ b/cinelerra-5.1/cinelerra/mbuttons.h @@ -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; diff --git a/cinelerra-5.1/cinelerra/mixersalign.C b/cinelerra-5.1/cinelerra/mixersalign.C index b5fe9227..5a148d38 100644 --- a/cinelerra-5.1/cinelerra/mixersalign.C +++ b/cinelerra-5.1/cinelerra/mixersalign.C @@ -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 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); diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index 7f502d10..c4e7a7cb 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -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(); ishow_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(); +} + diff --git a/cinelerra-5.1/cinelerra/mwindow.h b/cinelerra-5.1/cinelerra/mwindow.h index 13544431..d01f9ddb 100644 --- a/cinelerra-5.1/cinelerra/mwindow.h +++ b/cinelerra-5.1/cinelerra/mwindow.h @@ -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 *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. diff --git a/cinelerra-5.1/cinelerra/mwindowedit.C b/cinelerra-5.1/cinelerra/mwindowedit.C index 7e6c6445..d0a12594 100644 --- a/cinelerra-5.1/cinelerra/mwindowedit.C +++ b/cinelerra-5.1/cinelerra/mwindowedit.C @@ -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; idrag_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 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; idrag_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; idrag_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 *new_edls, int load_mode, need_new_tracks = 1; for( int i=0; itotal; ++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 *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 *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 *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 *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); diff --git a/cinelerra-5.1/cinelerra/mwindowgui.C b/cinelerra-5.1/cinelerra/mwindowgui.C index 7b92aa32..c90acab7 100644 --- a/cinelerra-5.1/cinelerra/mwindowgui.C +++ b/cinelerra-5.1/cinelerra/mwindowgui.C @@ -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); diff --git a/cinelerra-5.1/cinelerra/mwindowmove.C b/cinelerra-5.1/cinelerra/mwindowmove.C index 5abe4e6c..2ee2a70a 100644 --- a/cinelerra-5.1/cinelerra/mwindowmove.C +++ b/cinelerra-5.1/cinelerra/mwindowmove.C @@ -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; iplugin_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; iautomation->autos[i]; diff --git a/cinelerra-5.1/cinelerra/patchbay.C b/cinelerra-5.1/cinelerra/patchbay.C index 3292eeb5..381e1c0f 100644 --- a/cinelerra-5.1/cinelerra/patchbay.C +++ b/cinelerra-5.1/cinelerra/patchbay.C @@ -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); diff --git a/cinelerra-5.1/cinelerra/patchgui.C b/cinelerra-5.1/cinelerra/patchgui.C index e69b707a..dc518b5c 100644 --- a/cinelerra-5.1/cinelerra/patchgui.C +++ b/cinelerra-5.1/cinelerra/patchgui.C @@ -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); diff --git a/cinelerra-5.1/cinelerra/patchgui.h b/cinelerra-5.1/cinelerra/patchgui.h index a120beed..edbfdded 100644 --- a/cinelerra-5.1/cinelerra/patchgui.h +++ b/cinelerra-5.1/cinelerra/patchgui.h @@ -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: diff --git a/cinelerra-5.1/cinelerra/plugindialog.C b/cinelerra-5.1/cinelerra/plugindialog.C index f9c24fff..fba1ae79 100644 --- a/cinelerra-5.1/cinelerra/plugindialog.C +++ b/cinelerra-5.1/cinelerra/plugindialog.C @@ -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(); diff --git a/cinelerra-5.1/cinelerra/recordableatracks.C b/cinelerra-5.1/cinelerra/recordableatracks.C index d5d2ea49..4f7d1734 100644 --- a/cinelerra-5.1/cinelerra/recordableatracks.C +++ b/cinelerra-5.1/cinelerra/recordableatracks.C @@ -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); } } diff --git a/cinelerra-5.1/cinelerra/recordablevtracks.C b/cinelerra-5.1/cinelerra/recordablevtracks.C index 4e5ae452..d9ea7b54 100644 --- a/cinelerra-5.1/cinelerra/recordablevtracks.C +++ b/cinelerra-5.1/cinelerra/recordablevtracks.C @@ -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); } } diff --git a/cinelerra-5.1/cinelerra/swindow.C b/cinelerra-5.1/cinelerra/swindow.C index 289ae261..8e558fd1 100644 --- a/cinelerra-5.1/cinelerra/swindow.C +++ b/cinelerra-5.1/cinelerra/swindow.C @@ -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() 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; diff --git a/cinelerra-5.1/cinelerra/track.h b/cinelerra-5.1/cinelerra/track.h index ba47679c..4f81719c 100644 --- a/cinelerra-5.1/cinelerra/track.h +++ b/cinelerra-5.1/cinelerra/track.h @@ -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 diff --git a/cinelerra-5.1/cinelerra/trackcanvas.C b/cinelerra-5.1/cinelerra/trackcanvas.C index 0e42ed89..dda88761 100644 --- a/cinelerra-5.1/cinelerra/trackcanvas.C +++ b/cinelerra-5.1/cinelerra/trackcanvas.C @@ -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; iedl->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 ) { diff --git a/cinelerra-5.1/cinelerra/tracklist.C b/cinelerra-5.1/cinelerra/tracklist.C index fd7c8a86..a54720d0 100644 --- a/cinelerra-5.1/cinelerra/tracklist.C +++ b/cinelerra-5.1/cinelerra/tracklist.C @@ -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); } } diff --git a/cinelerra-5.1/cinelerra/trackpopup.C b/cinelerra-5.1/cinelerra/trackpopup.C index c00c023d..7b1d055a 100644 --- a/cinelerra-5.1/cinelerra/trackpopup.C +++ b/cinelerra-5.1/cinelerra/trackpopup.C @@ -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; diff --git a/cinelerra-5.1/cinelerra/tracks.C b/cinelerra-5.1/cinelerra/tracks.C index c8a6abd4..71aee8fc 100644 --- a/cinelerra-5.1/cinelerra/tracks.C +++ b/cinelerra-5.1/cinelerra/tracks.C @@ -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 *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; + } +} + diff --git a/cinelerra-5.1/cinelerra/tracks.h b/cinelerra-5.1/cinelerra/tracks.h index 88a96e48..f5a328ed 100644 --- a/cinelerra-5.1/cinelerra/tracks.h +++ b/cinelerra-5.1/cinelerra/tracks.h @@ -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 *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 diff --git a/cinelerra-5.1/cinelerra/tracksedit.C b/cinelerra-5.1/cinelerra/tracksedit.C index 7f46fcb2..849d6942 100644 --- a/cinelerra-5.1/cinelerra/tracksedit.C +++ b/cinelerra-5.1/cinelerra/tracksedit.C @@ -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 *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); diff --git a/cinelerra-5.1/cinelerra/vpatchgui.C b/cinelerra-5.1/cinelerra/vpatchgui.C index a2c2ca7c..73a4653a 100644 --- a/cinelerra-5.1/cinelerra/vpatchgui.C +++ b/cinelerra-5.1/cinelerra/vpatchgui.C @@ -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; diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index 25404f32..1217633f 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.C +++ b/cinelerra-5.1/cinelerra/vwindowgui.C @@ -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) diff --git a/cinelerra-5.1/cinelerra/vwindowgui.h b/cinelerra-5.1/cinelerra/vwindowgui.h index d4c395f7..d2527acd 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.h +++ b/cinelerra-5.1/cinelerra/vwindowgui.h @@ -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; diff --git a/cinelerra-5.1/doc/shortcuts.html b/cinelerra-5.1/doc/shortcuts.html index 5b547db9..343f7f5c 100644 --- a/cinelerra-5.1/doc/shortcuts.html +++ b/cinelerra-5.1/doc/shortcuts.html @@ -1422,6 +1422,12 @@ Ctrl-alt Increase all auto curve limits + +
+ UP (up arrow) + Shift + Move all tracks up by 1 +
DOWN arrow @@ -1446,6 +1452,12 @@ Ctrl-alt Decrease all auto curve limits + +
+ DOWN arrow + Shift + Move all tracks down by 1 +
PGUP (page up) diff --git a/cinelerra-5.1/plugins/theme_blond/blondtheme.C b/cinelerra-5.1/plugins/theme_blond/blondtheme.C index 7a54ee9b..52434590 100644 --- a/cinelerra-5.1/plugins/theme_blond/blondtheme.C +++ b/cinelerra-5.1/plugins/theme_blond/blondtheme.C @@ -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 index 00000000..9825bbc0 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 index 00000000..ac658091 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 index 00000000..483afee9 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 index 00000000..a955d185 Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/masterpatch.png differ diff --git a/cinelerra-5.1/plugins/theme_blond/data/patchbay_bg.png b/cinelerra-5.1/plugins/theme_blond/data/patchbay_bg.png index 81a23cdc..454864ab 100644 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 diff --git a/cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C b/cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C index 258b9e5b..6db8b722 100644 --- a/cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C +++ b/cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C @@ -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 index 00000000..b44809c0 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 index 00000000..e3bbd85b 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 index 00000000..4d99ae1a 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 index 00000000..a955d185 Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/masterpatch.png differ diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/patchbay_bg.png b/cinelerra-5.1/plugins/theme_blond_cv/data/patchbay_bg.png index 132badcd..57ca4936 100644 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 diff --git a/cinelerra-5.1/plugins/theme_blue/bluetheme.C b/cinelerra-5.1/plugins/theme_blue/bluetheme.C index 7b47576b..b589e0e3 100644 --- a/cinelerra-5.1/plugins/theme_blue/bluetheme.C +++ b/cinelerra-5.1/plugins/theme_blue/bluetheme.C @@ -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 index 00000000..9825bbc0 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 index 00000000..ac658091 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 index 00000000..483afee9 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 index 00000000..a955d185 Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/masterpatch.png differ diff --git a/cinelerra-5.1/plugins/theme_blue/data/patchbay_bg.png b/cinelerra-5.1/plugins/theme_blue/data/patchbay_bg.png index 114e9bd6..26719c86 100644 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 diff --git a/cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C b/cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C index 8255adc0..3d000749 100644 --- a/cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C +++ b/cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C @@ -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 index 00000000..2aef30e0 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 index 00000000..8bfbdf44 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 index 00000000..a2346a16 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 index 00000000..a955d185 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 index 00000000..445f56ed 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 index 00000000..061d6085 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 index 00000000..8cfd7863 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 index 00000000..73971b00 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 index 00000000..e8c85663 Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/patch_up.png differ diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/patchbay_bg.png b/cinelerra-5.1/plugins/theme_blue_dot/data/patchbay_bg.png index de5f7992..2263e109 100644 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 diff --git a/cinelerra-5.1/plugins/theme_bright/brighttheme.C b/cinelerra-5.1/plugins/theme_bright/brighttheme.C index fdce3ce0..6c8afa05 100644 --- a/cinelerra-5.1/plugins/theme_bright/brighttheme.C +++ b/cinelerra-5.1/plugins/theme_bright/brighttheme.C @@ -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 index 00000000..b5f7e279 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 index 00000000..70c3bdbb 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 index 00000000..cdcc5c15 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 index 00000000..a955d185 Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/masterpatch.png differ diff --git a/cinelerra-5.1/plugins/theme_bright/data/patchbay_bg.png b/cinelerra-5.1/plugins/theme_bright/data/patchbay_bg.png index 72d342dd..e8d3c5b5 100644 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 diff --git a/cinelerra-5.1/plugins/theme_cakewalk/cakewalk.C b/cinelerra-5.1/plugins/theme_cakewalk/cakewalk.C index c44ef502..22d2d554 100644 --- a/cinelerra-5.1/plugins/theme_cakewalk/cakewalk.C +++ b/cinelerra-5.1/plugins/theme_cakewalk/cakewalk.C @@ -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 index 00000000..9825bbc0 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 index 00000000..ac658091 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 index 00000000..483afee9 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 index 00000000..a955d185 Binary files /dev/null and b/cinelerra-5.1/plugins/theme_cakewalk/data/masterpatch.png differ diff --git a/cinelerra-5.1/plugins/theme_cakewalk/data/patchbay_bg.png b/cinelerra-5.1/plugins/theme_cakewalk/data/patchbay_bg.png index 8730109e..45efa45c 100644 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 index 00000000..82b37a8e 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 index 00000000..a99c6263 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 index 00000000..f6738f0c 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 index 00000000..a955d185 Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/masterpatch.png differ diff --git a/cinelerra-5.1/plugins/theme_hulk/data/patchbay_bg.png b/cinelerra-5.1/plugins/theme_hulk/data/patchbay_bg.png index b4f2ac28..036bce92 100644 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 diff --git a/cinelerra-5.1/plugins/theme_hulk/hulktheme.C b/cinelerra-5.1/plugins/theme_hulk/hulktheme.C index 3a9971f6..e9b216fe 100644 --- a/cinelerra-5.1/plugins/theme_hulk/hulktheme.C +++ b/cinelerra-5.1/plugins/theme_hulk/hulktheme.C @@ -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 index 00000000..9825bbc0 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 index 00000000..ac658091 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 index 00000000..483afee9 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 index 00000000..a955d185 Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/masterpatch.png differ diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/patchbay_bg.png b/cinelerra-5.1/plugins/theme_neophyte/data/patchbay_bg.png index 49b3086f..3424989f 100644 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 diff --git a/cinelerra-5.1/plugins/theme_neophyte/neophyte.C b/cinelerra-5.1/plugins/theme_neophyte/neophyte.C index 450adef7..e58d2c04 100644 --- a/cinelerra-5.1/plugins/theme_neophyte/neophyte.C +++ b/cinelerra-5.1/plugins/theme_neophyte/neophyte.C @@ -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 index 00000000..9825bbc0 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 index 00000000..ac658091 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 index 00000000..483afee9 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 index 00000000..a955d185 Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/masterpatch.png differ diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/patchbay_bg.png b/cinelerra-5.1/plugins/theme_pinklady/data/patchbay_bg.png index bc7ba425..93c3dfcf 100644 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 diff --git a/cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C b/cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C index e07369fd..db4ed973 100644 --- a/cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C +++ b/cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C @@ -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 index 00000000..9825bbc0 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 index 00000000..ac658091 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 index 00000000..483afee9 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 index 00000000..a955d185 Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/masterpatch.png differ diff --git a/cinelerra-5.1/plugins/theme_suv/data/patchbay_bg.png b/cinelerra-5.1/plugins/theme_suv/data/patchbay_bg.png index 475e5f14..8465b707 100644 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 diff --git a/cinelerra-5.1/plugins/theme_suv/suv.C b/cinelerra-5.1/plugins/theme_suv/suv.C index 2b3700b8..2b20a62e 100644 --- a/cinelerra-5.1/plugins/theme_suv/suv.C +++ b/cinelerra-5.1/plugins/theme_suv/suv.C @@ -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 index 00000000..9825bbc0 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 index 00000000..ac658091 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 index 00000000..483afee9 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 index 00000000..a955d185 Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/masterpatch.png differ diff --git a/cinelerra-5.1/plugins/theme_unflat/data/patchbay_bg.png b/cinelerra-5.1/plugins/theme_unflat/data/patchbay_bg.png index f05dc74e..9f245ef5 100644 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 diff --git a/cinelerra-5.1/plugins/theme_unflat/unflattheme.C b/cinelerra-5.1/plugins/theme_unflat/unflattheme.C index 82a8e815..4a09eb82 100644 --- a/cinelerra-5.1/plugins/theme_unflat/unflattheme.C +++ b/cinelerra-5.1/plugins/theme_unflat/unflattheme.C @@ -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");