Credit Andrea improved comments in render format
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / automation.C
index a407a4899eb22a430dfc62e187d53414c736672b..aa1c20067db0bcc33c3ec62abc73fcf62edbae12 100644 (file)
@@ -2,6 +2,7 @@
 /*
  * CINELERRA
  * Copyright (C) 2008-2013 Adam Williams <broadcast at earthling dot net>
+ * 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
@@ -62,37 +63,36 @@ Automation::~Automation()
        }
 }
 
-int Automation::autogrouptype(int autoidx, Track *track)
+int Automation::autogrouptype(int type, Track *track)
 {
-       int autogrouptype = -1;
-       switch (autoidx)
-       {
-               case AUTOMATION_CAMERA_X:
-               case AUTOMATION_PROJECTOR_X:
-                       autogrouptype = AUTOGROUPTYPE_X;
-                       break;
-               case AUTOMATION_CAMERA_Y:
-               case AUTOMATION_PROJECTOR_Y:
-                       autogrouptype = AUTOGROUPTYPE_Y;
-                       break;
-               case AUTOMATION_CAMERA_Z:
-               case AUTOMATION_PROJECTOR_Z:
-                       autogrouptype = AUTOGROUPTYPE_ZOOM;
-                       break;
-               case AUTOMATION_SPEED:
-                       autogrouptype = AUTOGROUPTYPE_SPEED;
-                       break;
-               case AUTOMATION_FADE:
-                       if (track->data_type == TRACK_AUDIO)
-                               autogrouptype = AUTOGROUPTYPE_AUDIO_FADE;
-                       else
-                               autogrouptype = AUTOGROUPTYPE_VIDEO_FADE;
-                       break;
-               case AUTOMATION_MUTE:
-                       autogrouptype = AUTOGROUPTYPE_INT255;
-                       break;
+       int group = -1;
+       switch( type ) {
+       case AUTOMATION_CAMERA_X:
+       case AUTOMATION_PROJECTOR_X:
+               group = AUTOGROUPTYPE_X;
+               break;
+       case AUTOMATION_CAMERA_Y:
+       case AUTOMATION_PROJECTOR_Y:
+               group = AUTOGROUPTYPE_Y;
+               break;
+       case AUTOMATION_CAMERA_Z:
+       case AUTOMATION_PROJECTOR_Z:
+               group = AUTOGROUPTYPE_ZOOM;
+               break;
+       case AUTOMATION_SPEED:
+               group = AUTOGROUPTYPE_SPEED;
+               break;
+       case AUTOMATION_FADE:
+               if (track->data_type == TRACK_AUDIO)
+                       group = AUTOGROUPTYPE_AUDIO_FADE;
+               else
+                       group = AUTOGROUPTYPE_VIDEO_FADE;
+               break;
+       case AUTOMATION_MUTE:
+               group = AUTOGROUPTYPE_INT255;
+               break;
        }
-       return (autogrouptype);
+       return group;
 }
 
 void Automation::create_objects()