1 Reply Latest reply on Apr 16, 2015 12:03 AM by c.pfaffenbichler

    Automatic naming: I have to create several panorama stitched images at one time.

    danieledom

      Hi all. I have to create several panorama stitched images at one time.

       

      Is there a way to automatically get PS (CC2014) to avoid "Untitled_Panorama# name and, for instance, get the name of one of the layers (one of the images to stitch together) adding a suffix?

      This would  avoid me having to copy the name of one of the images, before flattening, and then Save As using the copied name adding a letter or anything else.

      Thank you.

      Best regards. Danny

        • 1. Re: Automatic naming: I have to create several panorama stitched images at one time.
          c.pfaffenbichler Level 9

          Have you checked out the Scripts presented here?

          ps-scripts.com • View topic - Automating Photomerge to run folder-batches

          Adapting code from there I got this

          // 2015, use it at your own risk;
          var runphotomergeFromScript = true; // must be before Photomerge include
          //@includepath "/Applications/Adobe Photoshop CC/Presets/Scripts/"
          //@include "Photomerge.jsx"
          //@show include
          var psdOpts = new PhotoshopSaveOptions();
          psdOpts.embedColorProfile = true;
          psdOpts.alphaChannels = true;
          psdOpts.layers = true;
          var files = selectFile (true);
          mergeImages(files, psdOpts);
          ////// perform photomerge //////
          function mergeImages(fList, psdOpts) {
            // override Photomerge.jsx settings. Default is "Auto". Uncomment to override the default.
            photomerge.alignmentKey  = "Auto";
            //photomerge.alignmentKey  = "Prsp";
            //photomerge.alignmentKey  = "cylindrical";
            //photomerge.alignmentKey  = "spherical";
            //photomerge.alignmentKey  = "sceneCollage";
            //photomerge.alignmentKey  = "translation"; // "Reposition" in layout dialog
            // other setting that may need to be changed. Defaults below
            photomerge.advancedBlending      = true; // 'Bend Images Together' checkbox in dialog
            photomerge.lensCorrection      = true; // Geometric Distortion Correction'checkbox in dialog
            photomerge.removeVignette      = true; // 'Vignette Removal' checkbox in dialog
            if( fList.length >  0) {
                photomerge.createPanorama(fList,false);
            }
            // The merged doc will be the activeDocument
            activeDocument.saveAs( new File( fList[0].path+"/pano_"+activeDocument.layers[0].name.match(/(.*)\.[^\.]+$/)[1] + ".psd" ) , psdOpts, false, Extension.LOWERCASE);
          };
          ////// select file //////
          function selectFile (multi) {
          if (multi == true) {var theString = "please select files"}
          else {var theString = "please select one file"};
          if ($.os.search(/windows/i) != -1) {var theFiles = File.openDialog (theString, '*.jpg;*.tif;*.psd;*.png', multi)}
          else {var theFiles = File.openDialog (theString, getFiles, multi)};
          ////// filter files  for mac //////
          function getFiles (theFile) {
              if (theFile.name.match(/\.(jpg|tif|psd|png)$/i) || theFile.constructor.name == "Folder") {
                  return true
                  };
            };
          return theFiles
          };
          
          

          The original version would work based on Folders – if that would be useful check it out.