X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Flocalsession.C;h=c8428abd07e5c3f215b6ffdfd2b045afd0744a51;hp=c8cd9041a8019711706d96e4f8418870b757e92b;hb=HEAD;hpb=a6e4ede4b9a11b56b3aece044ff2a1546630ca38 diff --git a/cinelerra-5.1/cinelerra/localsession.C b/cinelerra-5.1/cinelerra/localsession.C index c8cd9041..c8428abd 100644 --- a/cinelerra-5.1/cinelerra/localsession.C +++ b/cinelerra-5.1/cinelerra/localsession.C @@ -2,6 +2,7 @@ /* * CINELERRA * Copyright (C) 2008 Adam Williams + * Copyright (C) 2003-2016 Cinelerra CV contributors * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,6 +25,7 @@ #include "clip.h" #include "bchash.h" #include "edl.h" +#include "edlsession.h" #include "filesystem.h" #include "filexml.h" #include "floatauto.h" @@ -72,9 +74,10 @@ LocalSession::LocalSession(EDL *edl) preview_start = 0; preview_end = -1; zoom_sample = DEFAULT_ZOOM_TIME; zoom_y = 0; - zoom_atrack = 0; - zoom_vtrack = 0; + zoom_atrack = 64; + zoom_vtrack = 64; x_pane = y_pane = -1; + gang_tracks = GANG_NONE; for(int i = 0; i < TOTAL_PANES; i++) { view_start[i] = 0; @@ -100,6 +103,7 @@ LocalSession::LocalSession(EDL *edl) red_max = green_max = blue_max = 0; use_max = 0; solo_track_id = -1; + gang_tracks = GANG_NONE; } LocalSession::~LocalSession() @@ -141,6 +145,7 @@ void LocalSession::copy_from(LocalSession *that) 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]; @@ -195,6 +200,8 @@ void LocalSession::save_xml(FileXML *file, double start) 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]) { @@ -233,6 +240,7 @@ void LocalSession::synchronize_params(LocalSession *that) 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; } @@ -292,7 +300,7 @@ void LocalSession::load_xml(FileXML *file, unsigned long load_flags) 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]); @@ -347,9 +355,9 @@ int LocalSession::load_defaults(BC_Hash *defaults) // track_start = defaults->get("TRACK_START", 0); // view_start = defaults->get("VIEW_START", 0); zoom_sample = defaults->get("ZOOM_SAMPLE", DEFAULT_ZOOM_TIME); - zoom_y = defaults->get("ZOOMY", 64); + zoom_y = defaults->get("ZOOMY", DEFAULT_ZOOM_TRACK); int64_t zoom_track = defaults->get("ZOOM_TRACK", 0); - if( zoom_track == 0 ) zoom_track = 64; + if( zoom_track == 0 ) zoom_track = DEFAULT_ZOOM_TRACK; zoom_atrack = defaults->get("ZOOM_ATRACK", zoom_track); zoom_vtrack = defaults->get("ZOOM_VTRACK", zoom_track); red = defaults->get("RED", 0.0); @@ -359,6 +367,7 @@ int LocalSession::load_defaults(BC_Hash *defaults) 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]) { @@ -396,6 +405,7 @@ int LocalSession::save_defaults(BC_Hash *defaults) 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]) { @@ -511,9 +521,12 @@ void LocalSession::reset_view_limits() { automation_mins[AUTOGROUPTYPE_ZOOM] = 0.005; automation_maxs[AUTOGROUPTYPE_ZOOM] = 5.000; - automation_mins[AUTOGROUPTYPE_X] = -100; - automation_maxs[AUTOGROUPTYPE_X] = 100; - automation_mins[AUTOGROUPTYPE_Y] = -100; - automation_maxs[AUTOGROUPTYPE_Y] = 100; + int out_w = edl->session->output_w; + automation_mins[AUTOGROUPTYPE_X] = -out_w; + automation_maxs[AUTOGROUPTYPE_X] = out_w; + int out_h = edl->session->output_h; + automation_mins[AUTOGROUPTYPE_Y] = -out_h; + automation_maxs[AUTOGROUPTYPE_Y] = out_h; + }