2 Replies Latest reply on Apr 22, 2016 12:35 AM by c.pfaffenbichler

    Smart Object Replacement Automation


      What I'm trying to do:


      I have a static background image with a single smart object. I need to somehow replace that smart object with different logos and then save out that file individually. It's kind of like a mail merge on a Microsoft Words doc, only with an image. Ideally, I'd like to do this without having to manually replace the smart object. Is this something that can be done in Photoshop? If so, how would I do it. It seems like a fairly simple process, however I'm having a really difficult time finding a way to do it. If this can be done, it would save me ALOT of time.


      Any help that can be provided would be great. Also, if I'm completely off base and there's a better way to do this then please share.


      Thank you!

        • 1. Re: Smart Object Replacement Automation
          JJMack Most Valuable Participant

          That can be scripted. However when replacing a smart object  layer content you must replace the object with an object the exactly  the same size and shape of the object being replaced.  For there is an associated transform for every smart object layer.  The transform is not replaced. The associated transform will only work correctly if the replacement is exactly like the original. 


          The way I get around this problem I use an alpha channel to map the size location and shape of smart placed in images  where I want the images to be.  So every image layer has an associated alpha channel.  I place all image on top of each other in order starting directly over the required background layer. 


          It is relatively easy for me to replaced a placed in image if the active smart object layer.  I get the the the active layer stack level relative to the bottom background layer. Using the relative number I get the alpha channel that maps that layer.  I do not replace the smart object layers content  I just delete the smart object layer, and place in a new image that can be and size. I size the layer to fill the bounds of the alpha channel  Load the alpha channel as a selection and position the place resized image layer over the center of the selection and add the alpha channel selection as a layer mask to mask the layer to the correct shape.