How can I record a Sky Replacement action/script ?
I do sky replacements, and I always use the same parameters. But I can’t get Photoshop to apply them, either batch, action, script, nothing works. It always defaults to the basic sky replacement values, and I have to tweak them one by one which is useless if I have may images to do. I’ve tried coding a Jsx file, still no luck, made a lot of tweaks, nothing. No idea why this issue persists. It’s a cool tool, but to be honest not being able to batch it is a HUGE let down. Any help is appreciated
// =======================================================
var idskyReplacement = stringIDToTypeID( "skyReplacement" );
var desc = new ActionDescriptor();
var idshiftEdge = stringIDToTypeID( "shiftEdge" );
desc.putDouble( idshiftEdge, -0.200000 );
var idborderSmoothness = stringIDToTypeID( "borderSmoothness" );
desc.putInteger( idborderSmoothness, 70 );
var idBrgh = charIDToTypeID( "Brgh" );
desc.putInteger( idBrgh, 32 );
var idtemperature = stringIDToTypeID( "temperature" );
desc.putInteger( idtemperature, 14 );
var idharmonizationOpacity = stringIDToTypeID( "harmonizationOpacity" );
desc.putInteger( idharmonizationOpacity, 0 );
var idforegroundLightingOpacity = stringIDToTypeID( "foregroundLightingOpacity" );
desc.putInteger( idforegroundLightingOpacity, 0 );
var idlightingMode = stringIDToTypeID( "lightingMode" );
var idBlnM = charIDToTypeID( "BlnM" );
var idScrn = charIDToTypeID( "Scrn" );
desc.putEnumerated( idlightingMode, idBlnM, idScrn );
var idedgeLightingOpacity = stringIDToTypeID( "edgeLightingOpacity" );
desc.putInteger( idedgeLightingOpacity, 14 );
var idskyReplacementOutput = stringIDToTypeID( "skyReplacementOutput" );
var idskyReplacementOutput = stringIDToTypeID( "skyReplacementOutput" );
var idskyReplacementOutputToDuplicateSheet = stringIDToTypeID( "skyReplacementOutputToDuplicateSheet" );
desc.putEnumerated( idskyReplacementOutput, idskyReplacementOutput, idskyReplacementOutputToDuplicateSheet );
var idIdnt = charIDToTypeID( "Idnt" );
desc.putString( idIdnt, """d36f6769-1c16-f641-bac6-aff4f13fa601""" );
var idNm = charIDToTypeID( "Nm " );
desc.putString( idNm, """BlueSky001byPhotoshop""" );
// var idFile = charIDToTypeID( "File" );
// desc.putPath( idFile, new File( "C:\\Users\\USERNAME\\AppData\\Roaming\\Adobe\\Adobe Photoshop 2026\\Adobe Photoshop 2026 Settings\\Sky_Presets\\d36f6769-1c16-f641-bac6-aff4f13fa601.jpg" ) );
executeAction( idskyReplacement, desc, DialogModes.NO );
