version update
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / colorbalance / colorbalance.C
index 7b8f0cffd01161201786b006221c299cad595e19..8d0dc3a99539fc8b434e4c9ee272a32a04d73258 100644 (file)
@@ -43,11 +43,28 @@ REGISTER_PLUGIN(ColorBalanceMain)
 
 ColorBalanceConfig::ColorBalanceConfig()
 {
-       cyan = 0;
-       magenta = 0;
-       yellow = 0;
-       lock_params = 0;
-    preserve = 0;
+       reset(RESET_ALL);
+}
+
+void ColorBalanceConfig::reset(int clear)
+{
+       switch(clear) {
+               case RESET_CYAN : cyan = 0;
+                       break;
+               case RESET_MAGENTA : magenta = 0;
+                       break;
+               case RESET_YELLOW : yellow = 0;
+                       break;
+               case RESET_ALL :
+               case RESET_DEFAULT_SETTINGS :
+               default:
+                       cyan = 0;
+                       magenta = 0;
+                       yellow = 0;
+                       lock_params = 0;
+                       preserve = 0;
+                       break;
+       }
 }
 
 int ColorBalanceConfig::equivalent(ColorBalanceConfig &that)
@@ -221,7 +238,6 @@ void ColorBalanceEngine::run()
        magenta_f = plugin->calculate_transfer(plugin->config.magenta); \
        yellow_f = plugin->calculate_transfer(plugin->config.yellow); \
  \
-printf("PROCESS_F %f\n", cyan_f); \
        for(j = row_start; j < row_end; j++) \
        { \
                for(k = 0; k < input->get_w() * components; k += components) \