deactivate_selection();
}
+ else if( get_button_down() && get_buttonpress() == LEFT_BUTTON &&
+ get_double_click() ) {
+ item = (AssetPicon*)get_selection(0, 0);
+ if( item ) {
+ switch( folder ) {
+ case AW_LABEL_FOLDER:
+ if( !item->label ) break;
+ mwindow->set_position(item->label->position);
+ break;
+ }
+ }
+ }
else if( get_button_down() && !gui->play_off &&
mwindow->edl->session->assetlist_format != ASSETS_TEXT ) {
item = (AssetPicon*)get_selection(0, 0);
{
delete transition;
transition = 0;
- if( edl->session->gang_tracks == GANG_NONE ) return;
+ if( edl->local_session->gang_tracks == GANG_NONE ) return;
double pos = track->from_units(startproject);
Track *current = edl->tracks->first;
for( ; current; current=current->next ) {
{
if( !group_id ) {
if( v < 0 ) v = !is_selected ? 1 : 0;
- int gang = edl->session->gang_tracks != GANG_NONE ? 1 : 0;
+ int gang = edl->local_session->gang_tracks != GANG_NONE ? 1 : 0;
select_affected_edits(v, gang);
}
else
mwindow->edl->session->vwindow_click2play ;
click2play->set_value(value);
}
- if( gang_tracks ) gang_tracks->update(mwindow->edl->session->gang_tracks);
+ if( gang_tracks ) gang_tracks->update(mwindow->edl->local_session->gang_tracks);
if( meters ) {
if( is_cwindow() ) {
meters->update(mwindow->edl->session->cwindow_meter);
{
this->mwindow = mwindow;
this->panel = panel;
- int gang = mwindow->edl->session->gang_tracks;
+ int gang = mwindow->edl->local_session->gang_tracks;
set_tooltip(_(gang_tips[gang]));
}
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;
+ int gang = mwindow->edl->local_session->gang_tracks;
return gang_images[gang];
}
int EditPanelGangTracks::handle_event()
{
- int gang = mwindow->edl->session->gang_tracks;
+ int gang = mwindow->edl->local_session->gang_tracks;
if( !shift_down() ) {
if( ++gang > GANG_MEDIA ) gang = GANG_NONE;
}
#include "bcdialog.h"
#include "guicast.h"
#include "editpanel.inc"
+#include "localsession.inc"
#include "meterpanel.inc"
#include "mwindow.inc"
#include "manualgoto.inc"
scrub_speed = 2.;
show_assets = 1;
show_titles = 1;
- gang_tracks = GANG_NONE;
si_useduration = 1;
si_duration = 3;
test_playback_edits = 1;
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);
timecode_offset = defaults->get("TIMECODE_OFFSET", timecode_offset);
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("TIMECODE_OFFSET", timecode_offset);
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);
timecode_offset = file->tag.get_property("TIMECODE_OFFSET", timecode_offset);
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("TIMECODE_OFFSET", timecode_offset);
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;
timecode_offset = session->timecode_offset;
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
#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;
zoom_atrack = 0;
zoom_vtrack = 0;
x_pane = y_pane = -1;
+ gang_tracks = GANG_NONE;
for(int i = 0; i < TOTAL_PANES; i++) {
view_start[i] = 0;
red_max = green_max = blue_max = 0;
use_max = 0;
solo_track_id = -1;
+ gang_tracks = GANG_NONE;
}
LocalSession::~LocalSession()
blue_max = that->blue_max;
use_max = that->use_max;
solo_track_id = that->solo_track_id;
+ gang_tracks = that->gang_tracks;
for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) {
automation_mins[i] = that->automation_mins[i];
file->tag.set_property("GREEN_MAX", green_max);
file->tag.set_property("BLUE_MAX", blue_max);
file->tag.set_property("USE_MAX", use_max);
+ file->tag.set_property("GANG_TRACKS", gang_tracks);
+
for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) {
if (!Automation::autogrouptypes_fixedrange[i]) {
blue_max = that->blue_max;
if( solo_track_id < 0 || that->solo_track_id < 0 )
solo_track_id = that->solo_track_id;
+ gang_tracks = that->gang_tracks;
}
green_max = file->tag.get_property("GREEN_MAX", green_max);
blue_max = file->tag.get_property("BLUE_MAX", blue_max);
use_max = file->tag.get_property("USE_MAX", use_max);
-
+ gang_tracks = file->tag.get_property("GANG_TRACKS", gang_tracks);
for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) {
if (!Automation::autogrouptypes_fixedrange[i]) {
automation_mins[i] = file->tag.get_property(xml_autogrouptypes_titlesmin[i],automation_mins[i]);
green_max = defaults->get("GREEN_MAX", 0.0);
blue_max = defaults->get("BLUE_MAX", 0.0);
use_max = defaults->get("USE_MAX", 0);
+ gang_tracks = defaults->get("GANG_TRACKS", GANG_NONE);
for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) {
if (!Automation::autogrouptypes_fixedrange[i]) {
defaults->update("GREEN_MAX", green_max);
defaults->update("BLUE_MAX", blue_max);
defaults->update("USE_MAX", use_max);
+ defaults->update("GANG_TRACKS", gang_tracks);
for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) {
if (!Automation::autogrouptypes_fixedrange[i]) {
int use_max;
// mask solo track, or -1
int solo_track_id;
+// gang mode: none, channels, media
+ int gang_tracks;
private:
// The reason why selection ranges and inpoints have to be separate:
// The selection position has to change to set new in points.
class LocalSession;
+#define GANG_NONE 0
+#define GANG_CHANNELS 1
+#define GANG_MEDIA 2
+#define TOTAL_GANGS 3
+
#endif
}
if( current ) {
// Set the redo text to the current description
- if( mwindow->gui ) {
- UndoStackItem *next = NEXT;
- mwindow->gui->mainmenu->redo->
- update_caption(next ? next->get_description() : "");
- }
+ UndoStackItem *next = NEXT;
+ mwindow->gui->mainmenu->redo->
+ update_caption(next ? next->get_description() : "");
char *current_data = current->get_data();
if( current_data ) {
FileXML file;
void MWindow::set_gang_tracks(int v)
{
- edl->session->gang_tracks = v;
+ edl->local_session->gang_tracks = v;
+ sync_parameters(CHANGE_PARAMS);
gui->update(1, 1, 0, 0, 1, 0, 0);
gui->flush();
}
ArrayList<SharedLocation> shared_locations;
PluginSet *pluginset = session->pluginset_highlighted;
- int gang = edl->session->gang_tracks != GANG_NONE ? 1 : 0;
+ int gang = edl->local_session->gang_tracks != GANG_NONE ? 1 : 0;
int data_type = dest_track->data_type;
int first_track = 1;
int MWindowGUI::focus_in_event()
{
for(int i = 0; i < TOTAL_PANES; i++)
- if(pane[i]) pane[i]->cursor->focus_in_event();
+ if(pane[i] && pane[i]->cursor) pane[i]->cursor->focus_in_event();
return 1;
}
int MWindowGUI::focus_out_event()
{
for(int i = 0; i < TOTAL_PANES; i++)
- if(pane[i]) pane[i]->cursor->focus_out_event();
+ if(pane[i] && pane[i]->cursor) pane[i]->cursor->focus_out_event();
return 1;
}
{
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i])
+ if(pane[i] && pane[i]->canvas)
{
pane[i]->canvas->deactivate();
}
{
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i])
+ if(pane[i] && pane[i]->canvas)
{
pane[i]->canvas->draw_overlays();
if(flash_it) pane[i]->canvas->flash();
{
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i])
+ if(pane[i] && pane[i]->canvas)
{
pane[i]->canvas->refresh_plugintoggles();
}
{
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i])
+ if(pane[i] && pane[i]->canvas)
{
pane[i]->canvas->draw_indexes(indexable);
}
void MWindowGUI::draw_canvas(int redraw, int hide_cursor)
{
resource_thread->stop_draw(0);
-
- int mode = redraw ? FORCE_REDRAW : NORMAL_DRAW;
+ int mode = NORMAL_DRAW;
+ if( redraw ) {
+ mode = FORCE_REDRAW;
+ resource_pixmaps.remove_all_objects();
+ }
for(int i = 0; i < TOTAL_PANES; i++) {
if( pane[i] )
pane[i]->canvas->draw(mode, hide_cursor);
{
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i])
+ if(pane[i] && pane[i]->canvas)
{
pane[i]->canvas->flash(flush);
}
{
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i])
+ if(pane[i] && pane[i]->cursor)
{
pane[i]->cursor->draw(do_plugintoggles);
}
{
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i])
+ if(pane[i] && pane[i]->cursor)
{
pane[i]->cursor->show(do_plugintoggles);
}
{
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i])
+ if(pane[i] && pane[i]->cursor)
{
pane[i]->cursor->hide(do_plugintoggles);
}
{
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i])
+ if(pane[i] && pane[i]->cursor)
{
pane[i]->cursor->update();
}
{
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i])
+ if(pane[i] && pane[i]->cursor)
{
pane[i]->cursor->playing_back = value;
}
{
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i])
+ if(pane[i] && pane[i]->canvas)
{
pane[i]->canvas->update_cursor(flush);
}
if( do_canvas != NO_DRAW && do_canvas != IGNORE_THREAD )
resource_thread->stop_draw(1);
+ if( do_canvas == FORCE_REDRAW )
+ resource_pixmaps.remove_all_objects();
+
for(int i = 0; i < TOTAL_PANES; i++)
{
if(pane[i]) pane[i]->update(scrollbars,
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i]) pane[i]->canvas->drag_motion(
- &over_track,
- &over_edit,
- &over_pluginset,
- &over_plugin);
+ if(pane[i] && pane[i]->canvas)
+ pane[i]->canvas->drag_motion(&over_track, &over_edit,
+ &over_pluginset, &over_plugin);
}
if(mwindow->session->track_highlighted != over_track)
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i]) result |= pane[i]->canvas->drag_stop(
- &redraw);
+ if(pane[i] && pane[i]->canvas)
+ result |= pane[i]->canvas->drag_stop(&redraw);
}
mwindow->edl->optimize();
int result = 0;
for(int i = 0; i < TOTAL_PANES; i++)
{
- if(pane[i]) result = pane[i]->cursor->repeat_event(duration);
+ if(pane[i] && pane[i]->cursor)
+ result = pane[i]->cursor->repeat_event(duration);
}
return result;
}
result = 0;
// Test play patch
if( result &&
- !current_track->play )
+ !current_track->plays() )
result = 0;
if( result ) {
EDL *edl = current_track->edl;
item->pixmap->draw_vframe(temp_picon2,
item->picon_x, item->picon_y,
item->picon_w, item->picon_h, 0, 0);
- gui->update(0, IGNORE_THREAD, 0, 0, 0, 0, 0);
+ TimelinePane *pane = gui->pane[item->pane_number];
+ if( pane ) pane->update(0, IGNORE_THREAD, 0, 0);
}
}
int Track::is_hidden()
{
if( master ) return 0;
- if( edl->session->gang_tracks == GANG_MEDIA ) return 1;
- if( edl->session->gang_tracks == GANG_CHANNELS ) {
+ if( edl->local_session->gang_tracks == GANG_MEDIA ) return 1;
+ if( edl->local_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;
Track *Track::gang_master()
{
Track *track = this;
- switch( edl->session->gang_tracks ) {
+ switch( edl->local_session->gang_tracks ) {
case GANG_NONE:
return track;
case GANG_CHANNELS: {
Track *current = track;
int data_type = track->data_type;
- while( current && !track->master ) {
+ while( current && !current->master ) {
if( !(current = current->previous) ) break;
if( current->data_type == data_type ) track = current;
}
int Track::in_gang(Track *track)
{
- if( edl->session->gang_tracks == GANG_NONE ) return ganged;
+ if( edl->local_session->gang_tracks == GANG_NONE ) return ganged;
Track *current = this;
while( current && !current->master ) current = current->previous;
while( track && !track->master ) track = track->previous;
int Track::armed_gang(Track *track)
{
- if( edl->session->gang_tracks == GANG_NONE ) return ganged;
+ if( edl->local_session->gang_tracks == GANG_NONE ) return ganged;
Track *current = gang_master();
for(;;) {
if( track == current ) return 1;
return 1;
}
+int Track::plays()
+{
+ return gang_master()->play;
+}
int Track::index_in(Mixer *mixer)
{
int is_ganged();
int armed_gang(Track *track);
int index_in(Mixer *mixer);
+ int plays();
EDL *edl;
Tracks *tracks;
resource_timer->update();
+ if(!indexes_only) {
// Age resource pixmaps for deletion
- if(!indexes_only)
for(int i = 0; i < gui->resource_pixmaps.total; i++)
gui->resource_pixmaps.values[i]->visible--;
-
- if(mode == FORCE_REDRAW)
- gui->resource_pixmaps.remove_all_objects();
-
+ }
if(debug) PRINT_TRACE
if(mode != IGNORE_THREAD)
gui->resource_thread->reset(pane->number, indexes_only);
if(!result)
{
//SET_TRACE
- result = new ResourcePixmap(mwindow,
- gui,
- edit,
- pane->number,
- pixmap_w,
- pixmap_h);
+ result = new ResourcePixmap(mwindow, gui, edit, pane->number, pixmap_w, pixmap_h);
+ set_bg_color(BLACK);
+ clear_box(0,0, pixmap_w,pixmap_h, result);
//SET_TRACE
gui->resource_pixmaps.append(result);
}
// 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;
+ int gang = mwindow->edl->local_session->gang_tracks != GANG_NONE ||
+ get_double_click() ? 1 : 0;
static BC_Pixmap *auto_pixmaps[AUTOMATION_TOTAL] =
{
int TrackCanvas::do_transition_handles(int cursor_x, int cursor_y, int button_press,
int &rerender, int &update_overlay, int &new_cursor, int &update_cursor)
{
+ if( !mwindow->edl->session->auto_conf->transitions )
+ return 0;
Transition *trans_result = 0;
int result = 0;
{
if( !track ) return 0;
if( gang < 0 )
- gang = edl->session->gang_tracks != GANG_NONE ? 1 : 0;
+ gang = edl->local_session->gang_tracks != GANG_NONE ? 1 : 0;
Track *nxt = track->next;
if( gang ) {
track = track->gang_master();
}
int Tracks::detach_ganged_effects(Plugin *plugin)
{
- if( edl->session->gang_tracks == GANG_NONE ) return 1;
+ if( edl->local_session->gang_tracks == GANG_NONE ) return 1;
for( Track *current=first; current; current=NEXT ) {
if( current == plugin->track ) continue;
if( !current->armed_gang(plugin->track) ) continue;
IntAuto *mute_auto = (IntAuto *)mute_keyframe;
result +=
- (current->play && type == PLAY) ||
+ (current->plays() && type == PLAY) ||
(current->is_armed() && type == RECORD) ||
(current->is_ganged() && type == GANG) ||
(current->draw && type == DRAW) ||
for(Track *current = first; current; current = NEXT)
{
- if(current->data_type == TRACK_AUDIO && current->play)
+ if(current->data_type == TRACK_AUDIO && current->plays())
{
result++;
}
for(Track *current = first; current; current = NEXT)
{
- if(current->data_type == TRACK_VIDEO && current->play)
+ if(current->data_type == TRACK_VIDEO && current->plays())
{
result++;
}
double total = 0;
for(Track *current = first; current; current = NEXT)
{
- if( current->play )
+ if( current->plays() )
{
double length = current->get_length();
if(length > total) total = length;
int Tracks::set_group_selected(int id, int v)
{
int count = 0;
- int gang = edl->session->gang_tracks != GANG_NONE ? 1 : 0;
+ int gang = edl->local_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( !found ) return;
- if( edl->session->gang_tracks == GANG_NONE ) return;
+ if( edl->local_session->gang_tracks == GANG_NONE ) return;
Track *track = transition->edit->track;
double pos = track->from_units(transition->edit->startproject);
Track *current = edl->tracks->first;
{
int total_deleted = 0;
int done = 0;
- int gang = edl->session->gang_tracks != GANG_NONE ? 1 : 0;
+ int gang = edl->local_session->gang_tracks != GANG_NONE ? 1 : 0;
while( !done ) {
done = 1;
input_track = input_track->next)
{
if(input_track->data_type == data_type &&
- input_track->play &&
+ input_track->plays() &&
!input_track->is_armed()) break;
}
if(input_track->data_type == data_type &&
!input_track->is_armed() &&
- input_track->play) break;
+ input_track->plays()) break;
}
for(output_track = output_track->next;
if( first == last ) return 1;
int n = 1;
Track *src = track, *dst = src->previous;
- if( edl->session->gang_tracks != GANG_NONE ) {
+ if( edl->local_session->gang_tracks != GANG_NONE ) {
while( src && !src->master ) src = src->previous;
if( !src ) src = first;
Track *nxt = src->next;
if( first == last ) return 1;
int n = 1;
Track *src = track, *dst = src->next;
- if( edl->session->gang_tracks != GANG_NONE ) {
+ if( edl->local_session->gang_tracks != GANG_NONE ) {
while( src && !src->master ) src = src->previous;
if( !src ) src = first;
Track *nxt = src->next;
if( first == last ) return 1;
int n = 1;
Track *src = first, *dst = 0;
- if( edl->session->gang_tracks != GANG_NONE ) {
+ if( edl->local_session->gang_tracks != GANG_NONE ) {
Track *nxt = src->next;
while( nxt && !nxt->master ) { ++n; nxt = nxt->next; }
}
if( first == last ) return 1;
int n = 1;
Track *src = last, *dst = first;
- if( edl->session->gang_tracks != GANG_NONE ) {
+ if( edl->local_session->gang_tracks != GANG_NONE ) {
while( src && !src->master ) { ++n; src = src->previous; }
}
if( src == dst ) return 1;
void Tracks::paste_transition(PluginServer *server, Edit *dest_edit)
{
dest_edit->insert_transition(server->title);
- if( edl->session->gang_tracks == GANG_NONE ) return;
+ if( edl->local_session->gang_tracks == GANG_NONE ) return;
Track *track = dest_edit->track;
double pos = track->from_units(dest_edit->startproject);
for( Track *current=first; current; current=current->next ) {
<td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
<td align="left"><font face="Liberation Serif" size=4>Use window layout #4</font></td>
</tr>
+ <tr>
+ <td height="26" align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
+ <td align="left"><font face="Liberation Serif,Times New Roman" size=4>In Labels folder</font></td>
+ <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Double click</font></td>
+ <td align="left"><font face="Liberation Serif,Times New Roman" size=4>On a Label, timeline cursor moves to label</font></td>
+ </tr>
<tr>
<td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
<td align="left"><font face="Liberation Serif" size=4><br></font></td>