merged hv7 mod
[goodguy/history.git] / cinelerra-5.1 / cinelerra / localsession.C
index 5d8249fe780d97e5eec9075b384265391f3f3561..0008bcd30a1d7051253903cdc2e9de84692e3132 100644 (file)
@@ -104,6 +104,8 @@ LocalSession::LocalSession(EDL *edl)
        floatauto_type = FloatAuto::SMOOTH;
 
        red = green = blue = 0;
+       red_max = green_max = blue_max = 0;
+       use_max = 0;
 }
 
 LocalSession::~LocalSession()
@@ -138,14 +140,17 @@ void LocalSession::copy_from(LocalSession *that)
        preview_end = that->preview_end;
        red = that->red;
        green = that->green;
+       blue = that->blue;
+       red_max = that->red_max;
+       green_max = that->green_max;
+       blue_max = that->blue_max;
+       use_max = that->use_max;
 
        for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) {
                automation_mins[i] = that->automation_mins[i];
                automation_maxs[i] = that->automation_maxs[i];
        }
        floatauto_type = that->floatauto_type;
-
-       blue = that->blue;
 }
 
 void LocalSession::save_xml(FileXML *file, double start)
@@ -192,6 +197,10 @@ void LocalSession::save_xml(FileXML *file, double start)
        file->tag.set_property("RED", red);
        file->tag.set_property("GREEN", green);
        file->tag.set_property("BLUE", blue);
+       file->tag.set_property("RED_MAX", red_max);
+       file->tag.set_property("GREEN_MAX", green_max);
+       file->tag.set_property("BLUE_MAX", blue_max);
+       file->tag.set_property("USE_MAX", use_max);
 
        for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) {
                if (!Automation::autogrouptypes_fixedrange[i]) {
@@ -217,6 +226,9 @@ void LocalSession::synchronize_params(LocalSession *that)
        red = that->red;
        green = that->green;
        blue = that->blue;
+       red_max = that->red_max;
+       green_max = that->green_max;
+       blue_max = that->blue_max;
 }
 
 
@@ -261,7 +273,10 @@ void LocalSession::load_xml(FileXML *file, unsigned long load_flags)
                red = file->tag.get_property("RED", red);
                green = file->tag.get_property("GREEN", green);
                blue = file->tag.get_property("BLUE", blue);
-
+               red_max = file->tag.get_property("RED_MAX", red_max);
+               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);
 
                for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) {
                        if (!Automation::autogrouptypes_fixedrange[i]) {
@@ -310,6 +325,10 @@ int LocalSession::load_defaults(BC_Hash *defaults)
        red = defaults->get("RED", 0.0);
        green = defaults->get("GREEN", 0.0);
        blue = defaults->get("BLUE", 0.0);
+       red_max = defaults->get("RED_MAX", 0.0);
+       green_max = defaults->get("GREEN_MAX", 0.0);
+       blue_max = defaults->get("BLUE_MAX", 0.0);
+       use_max = defaults->get("USE_MAX", 0);
 
        for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) {
                if (!Automation::autogrouptypes_fixedrange[i]) {
@@ -340,6 +359,10 @@ int LocalSession::save_defaults(BC_Hash *defaults)
        defaults->update("RED", red);
        defaults->update("GREEN", green);
        defaults->update("BLUE", blue);
+       defaults->update("RED_MAX", red_max);
+       defaults->update("GREEN_MAX", green_max);
+       defaults->update("BLUE_MAX", blue_max);
+       defaults->update("USE_MAX", use_max);
 
        for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) {
                if (!Automation::autogrouptypes_fixedrange[i]) {