6 Replies Latest reply on May 23, 2016 10:06 AM by Rick Gerard

    Batch export of comps to psd layers

    markp96265879

      Does anyone know if there is a script out there to batch export comps to psd layers??

       

      At the moment in After Effects, as you all know to get a layered psd from your comp you have to go to composition > save frame as > Photoshop layers. But there is no option to do multiple compositions.


      Just wondering if anyone could help me out.

       

      Thanks,

      Mark

        • 1. Re: Batch export of comps to psd layers
          Rick Gerard Adobe Community Professional & MVP

          You could probably write a script to do that buy you would have to define what frame in the comp you wanted to use to create the PSD Layered file. There is no way to do that with an expression or the Render Cue or a keyboard shortcut.

          • 2. Re: Batch export of comps to psd layers
            markp96265879 Level 1

            The problem is I have no scripting experience so i just wanted to see if there was something already out there. The comps i'm working with at the moment are all 1 frame each because they are being used for dvd overlays.

            • 3. Re: Batch export of comps to psd layers
              UQg Level 4

              I did a quick test to see if it is possible via scripting.

              It seems to be, but one cannot get rid of the dialogs ("Save As", and eventually "Confirm overwrite"), which is pretty annoying.

              The time at which the comps are exported is the time of the first selected comp.

               

              var w = this instanceof Panel ? this : new Window("palette", "To PSD");
              w.btn = w.add("button{text: 'To PSD', helpTip: 'If the project panel selection is empty :\\r\\tprocesses the active composition (viewer).\\rElse\\r\\tprocess the selected comps.\\r\\tNormal click: all comps will remain open\\r\\tShift+Click: process AND close'}");
              w.btn.onClick = function(){
                  this.parent.coreFunction(ScriptUI.environment.ShiftKey);
                  };
              w.coreFunction = function(doClose){
                  var closeID = app.findMenuCommandId("Close");
                  var exportID = app.findMenuCommandId("Photoshop Layers...");
                  
                  var selection, n, N, comp, t, time;
                  
                  // app.beginSuppressDialogs();    // useless: doesnt work
                  
                  selection = app.project.selection;
                  N = selection.length;
                  
                  if (N>0){
                      for (n=0; n<N; n++){
                          comp = selection[n];
                          if (comp.typeName!=="Composition") continue;
                          comp.openInViewer();
                          if (typeof time==='undefined') time = comp.time;
                          t = comp.time;
                          comp.time = time;
                          app.executeCommand(exportID);
                          comp.time = t;
                          if (doClose) app.executeCommand(closeID);
                          };
                      }
                  else{
                      comp = app.project.activeItem;
                      if (comp && comp.typeName==="Composition") app.executeCommand(exportID);
                      };
              
                  // app.endSuppressDialogs(false);    // useless: doesnt work
              
                  return;
                  };
              w instanceof Panel ? w.layout.layout(true) : w.show();
              

               

              Xavier

              • 4. Re: Batch export of comps to psd layers
                markp96265879 Level 1

                Hi Xavier thanks for your input on this topic. Is there no way to automatically override those commands then? Like a photoshop action sort of command??

                • 5. Re: Batch export of comps to psd layers
                  UQg Level 4

                  I don't think so, but i'd rather say i dont know.

                  If there were render queue outputmodules for still images, it would be possible, but i dont think there are any.

                   

                  Xavier

                  • 6. Re: Batch export of comps to psd layers
                    Rick Gerard Adobe Community Professional & MVP

                    The output module already has a template to export Photoshop sequences, but the output module does not have the ability to export layered PSD files.

                     

                    The biggest problem that I can see with this idea is that saving a frame as a layered Photoshop file give you only the lawyers and their positions under the current position of the CTI (Current time indicator). If you have 40 layers and only two of them are in position and under the CTI you'll only get two layers in your Photoshop file.