• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Multiple images imported into smart object and saved

New Here ,
Jan 24, 2018 Jan 24, 2018

Copy link to clipboard

Copied

Hello,

I have a folder with 100+ images and a mock-up template with smart object. My question is how to import 100+ into the smart object and save them creating 100+ different images?

I don't know if I need a script for that so I will appreciate if someone can help. Thanks in advance

Kind regards,

Alex

TOPICS
Actions and scripting

Views

347

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Advocate ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

LATEST

I'm not sure is that you wanted so just try it and we'll work out something:

function sTT(v) {return stringIDToTypeID(v)}

function dup(v) {

     (ref1 = new ActionReference()).putEnumerated

     (sTT('layer'), sTT('ordinal'), sTT('targetEnum'));

     (dsc1 = new ActionDescriptor()).putReference(sTT('null'), ref1);

     (ref2 = new ActionReference()).putIndex(sTT('document'), v)

     dsc1.putReference(sTT('to'), ref2), executeAction

     (sTT('duplicate'), dsc1, DialogModes.NO)

}

(sub = Folder((fls = Folder.selectDialog('Select folder:')

.getFiles(/.jpe?g/i))[0].path + '/Processed')).create()

executeAction(sTT('placedLayerEditContents'))

function fD(v) {activeDocument=doc}; for(i=0;i<fls.length;i++) {

     open(fls), dup(2), doc = documents, fD(1), doc[1].save(), fD(0)

     doc[0].saveAs(File(sub + '/' + doc[2].name)), doc[2].close(), fD(1)

     doc[1].activeHistoryState = (hS = doc[1].historyStates)[hS.length - 2]

}

while(doc.length) activeDocument.close(SaveOptions.DONOTSAVECHANGES)

Just open your .psd file containing smart object, then run script. It prompts you to choose folder containing 100+ files. Then it opens each file (change jpe?g to appropiate format in script, before you run it !), put to smart object as top level layer and save as smart object in new .psd file with original (jpg / other) file name of (self-created) subfolder that is in 100+ files folder.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines