0

i have a folder(ProjectA) containing multiple folders(Pano1, Pano2, Pano3...) which contain 2 images each (Left1 & right1, left2 & right2, left3 & right3...).

I used a script in photoshop to run photomerge on each 'Pano' folder in ProjectA.

It used to run perfectly where it will open Left1, then Right1, in photomerge and process the panorama. Always left, then right.

Now after installing High Sierra, the SSD that i am working on has changed file formats to APFS. Now it will sometimes take Right1, then Left1, causing the resulting panorama to be different than if it takes Left1 then Right1. It does not seem random in the way it chooses Left or Right first but i cannot figure to the logic it uses.

I know it is APFS causing the issue because if i put ProjectA in a HFS+ HDD, the script runs perfectly.

This is the script i use, any help will be greatly appreciated!

var runphotomergeFromScript = true; // must be before Photomerge include 
//@includepath /Applications/Adobe Photoshop CS6/Presets/Scripts/
//@include "Photomerge.jsx"
//@show include 

psdOpts = new PhotoshopSaveOptions(); 
psdOpts.embedColorProfile = true; 
psdOpts.alphaChannels = true; 
psdOpts.layers = true; 

var jpegOptions = new JPEGSaveOptions();
jpegOptions.quality=12;
jpegOptions.scans=5;

var workFolder = Folder.selectDialog(); 
var folders = workFolder.getFiles( function( file ) { return file instanceof Folder; } ); 

for( var i = 0; i < folders.length; i++ ) 
{   
var folder = folders[i]; 
var fList = folder.getFiles( '*.jpg' );

   // 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      = false; // Geometric Distortion Correction'checkbox in dialog 
   photomerge.removeVignette      = false; // 'Vignette Removal' checkbox in dialog 

   if( fList.length > 1 )
   {
   photomerge.createPanorama(fList,false); 
   } 

   // The merged doc will be the activeDocument 
   // activeDocument.saveAs( new File( fList[0].parent + '/Stitch.psb' ) , psdOpts, true, Extension.LOWERCASE); 

//   try to always save as psb for larger files
activeDocument.saveAs( new File( fList[0].parent + '.jpg' ) , jpegOptions, true, Extension.LOWERCASE);  
activeDocument.close( SaveOptions.DONOTSAVECHANGES ); 
}

function savePSB(fileNameAndPath)
{
function cTID(s) { return app.charIDToTypeID(s); };
function sTID(s) { return app.stringIDToTypeID(s); };

var desc19 = new ActionDescriptor();
 var desc20 = new ActionDescriptor();
desc20.putBoolean( sTID('maximizeCompatibility'), true );
desc19.putObject( cTID('As  '), cTID('Pht8'), desc20 );
desc19.putPath( cTID('In  '), new File( fileNameAndPath ) );
desc19.putBoolean( cTID('LwCs'), true );
executeAction( cTID('save'), desc19, DialogModes.NO );
};
  • I assume that your script makes assumptions on order in which files are read from directory: `var fList = folder.getFiles( '*.jpg' );` – el.pescado - нет войне Feb 01 '18 at 10:04
  • If el.pescado is correct then your problem may just boil down to arranging your new array "fList" to the order that is necessary. There are multiple ways to do this.. let us know how it goes. – Dominic Fox Feb 09 '18 at 23:02

0 Answers0