Skip to main content
wckdtall
Inspiring
August 3, 2017
Question

Is there a way to batch through embedded smart objects and update to parent document resolution?

  • August 3, 2017
  • 1 reply
  • 1303 views

In dealing with web(72dpi), print(300dpi) and large format print(150dpi), I'm running into a lot of manual labor trying to update files that have smart objects at various resolutions. Recently I had been working on assets that were designed at 300dpi, that were supposed to be 150dpi, and smart objects inside were either 72dpi or 300dpi. In updating the smart object to the correct resolution, the layers of course change size now that they are at the correct resolution. What I've been doing is transforming the smart object to copy a measurement in inches from the bar, editing contents of an SO, changing resolution to 150dpi in image size(no resampling), save SO, update SO, close SO, transform, paste copied measurement. I have an action for the middle part of this, but selecting copying and pasting still have to be done manually, as well as if the SO has a mask I have to drag to another layer first to ensure I'm getting the right measurement. Ideally, Adobe would change the behavior of smart objects so that they would read pixel information of the SO(similar to Illustrators behavior with raster graphics) rather than the size at the resolution of the SO, and not the parent doc. The minute the resolution changes in the parent doc the embedded/linked SO are incorrect again.

The script would ideally loop and update all smart objects in a file, including nested SOs within SOs, and spit out a report dialog or text file with changes. However, if it can only be done with the selected layer that'd still speed things up. Anyone have any thoughts on how to achieve this? While I do script in Photoshop and Illustrator, I have not yet worked with SOs. I'm in PS 2015, but have also tested the behavior in 2017 and it still shows the same mismatch and potential loss in image quality

This topic has been closed for replies.

1 reply

Chuck Uebele
Community Expert
Community Expert
August 4, 2017

I think it might be possible. Working with SO's is really no different than other layers, You just have to get some scriptlistener code to open the SO, then write whatever you want to change the file. I think the issue comes in when trying to scale SOs. They seem to have their own baked in size, which changing can create issues.

wckdtall
wckdtallAuthor
Inspiring
August 5, 2017

Thanks! I'll look into it. I wish they would expand extendscript functionality as script listener is so illegible. Might be time to explore SDK.

Chuck Uebele
Community Expert
Community Expert
August 5, 2017

Yea, extendscript needs some updating. The SDK is confusing - at least for me. Davide Barranca is suppose to be writing a book on extendscript, which will be great. He wrote section on making action manager code more legible, which really helps.