How to automate replacing smart object from folder?

Hello!
I have a layout in CS6, with an image that is a smart object. I have a folder of jpgs, and need to make comps from each of the JPGs. At the moment I take the master, double click the smart object. Place in the source JPG from the folder I'm working on. Save, back in the master, I export the updated layout for web. Then repeat.
What I'd like to do, is use an action or script, that I could point to the folder of JPGs, and have it automatically, update the smart object with the JPGs export the comp as jpg for all of them.
Is there a way to do this without being a programmer?
Thanks
Maxi

Here's screenshots of a solution that doesn't require a script. You'll need to manually open the layout doc then open the SO but everything else is automated by Batch. Make absolutely sure that the SO doc is active when starting to record the Action and when you launch Batch. That's necessary for the "Select previous document" and "Select next document" steps to refer to the correct docs.

Similar Messages

  • Batch Replace Smart Object With Different Image Quality and Sizes

    Hi there,
    I need help. I have this template that is in 1000x1000pixel and 300 dpi. I'm trying to replace the smart object inside with various JPEG that I have. These JPEG comes in large image sizes but lower than 300dpi. The issues is, when I run the script that I have, some of the pictures become really pixelated. Beforehand, I resized them to fit into the empty place in sizes that I find fit the best (8 cm x 6 cm). Some of them work okey, but then some of them just pretty bad. I'm wondering if you can help me fix the script that I have so I didn't have to resized the images before running the script, and for all of them to automatically fit into my template without altering the quality of the image that I put in.
    below is the script that I am using and the screenshot of my template:
    #target photoshop
    if (app.documents.length > 0) {
    var myDocument = app.activeDocument;
    var theName= myDocument.name.match(/(.*)\.[^\.]+$/)[1];
    var thePath = myDocument.path;
    var theLayer = myDocument.activeLayer;
    // psd options;
    psdOpts = new PhotoshopSaveOptions();
    psdOpts.embedColorProfile = true;
    psdOpts.alphaChannels = true;
    psdOpts.layers = true;
    psdOpts.spotColors = true;
    // check if layer is smart object;
    if (theLayer.kind != "LayerKind.SMARTOBJECT") {alert ("selected layer is not a smart object")}
    else {
    // select files;
    if ($.os.search(/windows/i) != -1) {var theFiles = File.openDialog ("please select files", "*.psd;*.jpg;*.jpeg;*.tif", true)}
    else {var theFiles = File.openDialog ("please select files", getFiles, true)};
    if (theFiles) {
    // work through the array;
    for (var m = 0; m < theFiles.length; m++) {
    // replace smart object;
    theLayer = replaceContents (theFiles[m], theLayer);
    var theNewName = theFiles[m].name.match(/(.*)\.[^\.]+$/)[1];
    //Raise color picker for Back cover;
    try {
    app.activeDocument.activeLayer = app.activeDocument.layers[app.activeDocument.layers.length - 1];
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
    var desc7 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
    var ref2 = new ActionReference();
    var idcontentLayer = stringIDToTypeID( "contentLayer" );
    var idOrdn = charIDToTypeID( "Ordn" );
    var idTrgt = charIDToTypeID( "Trgt" );
    ref2.putEnumerated( idcontentLayer, idOrdn, idTrgt );
    desc7.putReference( idnull, ref2 );
    var idT = charIDToTypeID( "T " );
    var desc8 = new ActionDescriptor();
    var idClr = charIDToTypeID( "Clr " );
    var idsolidColorLayer = stringIDToTypeID( "solidColorLayer" );
    desc7.putObject( idT, idsolidColorLayer, desc8 );
    executeAction( idsetd, desc7, DialogModes.ALL );
    } catch (e) {};
    //save jpg;
    myDocument.saveAs((new File(thePath+"/"+theName+"_"+theNewName+".jpg")),psdOpts,true);
    ////// get psds, tifs and jpgs from files //////
    function getFiles (theFile) {
    if (theFile.name.match(/\.(psd|tif|jpeg|jpg)$/i) != null || theFile.constructor.name == "Folder") {
    return true
    ////// replace contents //////
    function replaceContents (newFile, theSO) {
    app.activeDocument.activeLayer = theSO;
    // =======================================================
    var idplacedLayerReplaceContents = stringIDToTypeID( "placedLayerReplaceContents" );
    var desc3 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
    desc3.putPath( idnull, new File( newFile ) );
    var idPgNm = charIDToTypeID( "PgNm" );
    desc3.putInteger( idPgNm, 1 );
    executeAction( idplacedLayerReplaceContents, desc3, DialogModes.NO );
    return app.activeDocument.activeLayer

    Thank you for your answer.
    I was resizing it before from bigger image size to a smaller one (121 cm to 8 cm) which fit my template size. But the dpi remains in 72 which makes the picture pixelized.
    I am wondering if I can find a script that will keep the size of the first image that I put on the template for other images that I place, regardless the size they are imported to. Basically, how to make them all fit into the template regardless the size.
    Thank you for the info about the scripting forum. I will write there too.
    Sorry, I'm so new to this

  • Replace smart object script

    Disclaimer: I do not know how to script, but am willing to learn and am looking for advice.
    I need to replace the text in a smart object from a data list then save the updated file using the smart object text. Is there an existing script that will do this?
    I cannot use a straight text layer because I'm performing a free distortion warp on the smart object that does not work on straight text. Using variables seems like a logical solution, but the only variable type for smart objects is "visibility".
    Plan "B" is to "replace smart object" with a series of PSD files containing the appropriate text. This works great, but I don't know how to automate it. I can easily create the series of PSD files using variables, but don't know how to automate their insertion into the template containing the distorted smart object.
    I'm looking forward to learning something new!

    I took a quick look at your script.
    I do not know where the the displacement map come in,
    The script seem the be replacing the object content of the current smart object layer.
    That layer can have had all sort of photoshop functions associated with it and has an associated transform.  All smart object layer have an associated transform and may have smart filters and filter mask as well.
    I see no code to handle the smart object size and make the replacement object have the same size or insure the replacement object is the aspect ratio and size.  Replacing  a smart object content does not change the current layer's associated the transform that transformed the original object. If the replacement object is not the same size as the original object the transform may not work like your expecting.
    An associated displacement map may come into play because of smart filters on the smart object layer. Displacement  maps content are either for the layers content or for lower layers content to make the current layer to conform to lower layers contours.
    In fact I create a four image picture package template that used a smart object for the image. Added CS2 for a file type that could be used to replace the image  in your script and ran your script.  It did pop up the ACR dialog if I select a raw file but it worked perfectly for my portrait cr2 files are the same size and aspect ratio. Ast the object.
    And a jpeg was saved to my desktop.
    When a different size landscape orianted portrait image is selected here is the result

  • Illustrator Application Window Resizes When Opening Smart Object from PSD

    Hi All, I've taken a vector graphic created in AI CS4 and pasted it into my PSD CS4 doc as a smart object. When the original AI file was created the application window was set as I preferred it, filling my screen. When I double click the Smart Object in PSD to edit it back in Illy, the window that contains the application has been switched off of the fill screen mode and is quite a bit smaller. I know it's small but now I have to click the maximize icon in the application bar to get Illy to fill the screen again. It wouldn't be so bad once, but the application window resizes itself every time I punch back into the smart object from PSD.
    Any ideas on how I can get the AI environment from switching around on its own??
    Win 7, CS4, all patches current, Dual 22" montiors
    thnx,
    jeff

    I just want to point out that when you open the smart object of course it is not the same file as the original but an embedded copy of it.
    That might also have something to do with this issue and might also be a photoshop issue with the smart object and one reason might be that Photoshop is see the image as resolution and Illustrator sees it as a dimension and the teams might be able to do something about this but might not actually be aware of it unless you file a report even if it is not a bug it would then be a feature request.
    They might not be able to do anything about it but then there might be a clever engineer with an idea, so it might be worth the report.

  • How to extend/ replace generated classes from JAXB

    Hello Experts,
    In our application (Which uses Java Webdynpro as the UI and RFC’s for the backend access- an R/3 System), there is a need to construct an XML file (from the data entered by the user) which will be later accepted by the backend system. Now to avoid manual creation of the XML document, what we did is that we created an XSD file based on the back end structure (This XSD contains definition for all the possible fields and structures in the back end).
    Then we used the JAXB implementation to automatically create Java Objects from the XSD file. We populate this JAXB generated Java objects and then use the Serialization framework to serialize them into an XML file.
    This all works well, provided that the structure of the back end system does not change, but unfortunately it can, customer can add additional attributes to the existing structures (They do not create new structures, just add new attributes to it so I do not need to create new Java Object classes at runtime, I need only to add attributes to them). If they do so, the XSD and corresponding Java Objects (which are shipped as part of the source code) do not remain valid anymore as the automatically generated Objects (which correspond to the structures in the back end) would not have the definition of the newly added attributes.
    Can anyone please suggest how to overcome this limitation with JAXB.
    The needed functionality is that somehow I should be able to add fields (corresponding to the customer added attributes) to the automatically created Java objects and thus pass the data in the additional attribute to the backend. (Please note that at runtime using an RFC, I can find out the current structure of the backend but the structure at the Webdynpro end (set of Java objects generated from the JAXB) is static and is a part of the code).
    Any comments/suggestions could be of great help.
    Thanks
    Amit Kapoor

    You cannot do that. TheJAVA language does not allow a class to "extend" more than one upper class.
    Typically, the solution is to modify your architecture a little bit. Just use the "has a" relationship instead of "is a". That means something like that:public class MyFraisMessage
        extends MyOtherClass
        private FraisMessage message;
      etc...You write an extension "MyFraisMessage" of your upper class "MyOtherClass", which has the JAXB generated object as an attribute. This structure is often useful, when you think you would need multiple inheritance.

  • How can you move the objects from one server to another?

    how can you move the objects from one server to another?

    Hi,
    Collecting objects for Transporting
    1. rsa1->transport connection
    2. left panel choose 'object type', middle panel choose 'infocube' and 'select objects'
    3. then choose your infocube and 'transfer'
    4. will go to right panel, choose collection mode 'manual' and grouping only 'necessary objects'
    5. after objects collection finished, create request
    6. If they are $TMP, then change the package.
    7. When you click the Save on the change package, it will prompt for transport. Here you can provide an existing open transport request number, or if you like here itself you can create a new one.
    8. You can check the request in SE09 to confirm.
    Releasing Transport Request  
    Lets say you are transporting from BWD to BWQ
    Step 1: In BWD go to TCode SE10
    Step 2: Find the request and release it (Truck Icon or option can be found by right click on request #)
    Note: First release the child request and then the parent request
    Steps below are to import transport (generally done by basis )
    Step 1: In BWQ go to Tcode STMS
    Step 2: Click on Import queue button
    Step 3: Double Click on the line which says BWQ (or the system into which transport has to be imported)
    Step 4: Click on refresh button
    Step 5: High light the trasnport request and import it (using the truck icon)
    Transport
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b5/1d733b73a8f706e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/0b/5ee7377a98c17fe10000009b38f842/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/224381ad-0701-0010-dcb5-d74236082bff
    Hope this helps.
    thanks,
    JituK

  • How do I move an object from one photo to another and then change the scene, i.e.  winter to sum?

    How do I move an object from one photo to another and then change the scene, i.e.  winter to summer?

    OK.
    Open the picture with the new scene. This will be your canvas.
    Open the picture with object A, select it with one of the selection tools, go to Edit>copy
    Go back to the new scene/canvas, Go to Edit>paste
    Repeat for object B
    Use the move tool to position A & B, each on its own layer. Use the corner handles of the bounding box to resize, if necessary
    You should have 3 layers: Background layer, and the 2 layers with A & B
    Note: It's best if the resolution of the 3 picture files is the same value.

  • How to call a COM object from an Oracle Form?

    Hi All,
    Pls advice. How to call a COM object from an Oracle Form?
    Thanks.

    try asking the "Form" forum

  • How do I create an object from a filename?

    I'm traversing directories and storing a list of files in a File array. Then I traverse the array looking at the extension of the file. If it is .java then I would like to instantiate it as a class so that I may pass the new object to another function which will examine its methods. I've tried Class.forName(file.getCanonicalPath()) and it throws a ClassNotFound exception. How can I create an object from a valid filename, please?

    Rick_Avlonitis wrote:
    If it is .java then I would like to </snip>.java files contain source code, they can't be "instantiated". Class.forName() takes a classname as parameter, i.e. "mypackage.MyClass". A class name is not a file name, and it doesn't have an extension. As stated in the other reply, you'll need to have the class on your class path.

  • How do I replace one adaptor from my Apple World Traveler Adaptor Kit?

    How do I replace one adaptor from my Apple World Traveler Adaptor Kit?

    If you have lost it then you might find a single replacement you can purchase at a AAA travel store. You could call your local Apple Store to ask, but Apple does not sell the adapters separately.

  • How to pass arraylist of object from action class to jsp and display in jsp

    I need to do the following using struts
    I have input jsp, action class and action form associated to that. In the action class I will generate the sql based on the input from jsp page/action form, create a result set. The result set is stored as java objects in a ArrayList object.
    Now I need to pass the arraylist object to another jsp to display. Can I put the ArrayList object in the request object and pass to the success page defined for the action? If this approach is not apprpriate, please let me know correct approach.
    if this method is okay, how can I access the objects from arraylist in jsp and display their property in jsp. This java object is a java bean ( getter and setter methods on it).
    ( need jsp code)
    Can I do like this:
    <% ArrayList objList = (ArrayList)request.getattribute("lookupdata"): %> in jsp
    (***I have done request.setattribute("lookupdata", arraylistobj); in action class. ***)
    Assuming the java object has two properties, can I do the following
    <% for (iint i=0. i<objList.size;I++){ %>
    <td> what should i do here to get the first property of the object </td>
    <td> what should i do here to get the first property of the object </td>
    <% }
    %>
    if this approach is not proper, how can I pass the list of objects and parse in jsp?
    I am not sure what will be the name of the object. I can find out how many are there but i am not sure I can find out the name
    thanks a lot

    Double post:
    http://forum.java.sun.com/thread.jspa?threadID=5233144&tstart=0

  • Batch converion to PS smart objects from ACR 4.2

    I want to open a bunch of raw files in ACR 4.2 from Bridge and create PhotoShop smart objects from them. I tried to do this by selecting the files in Bridge and opening them all in ACR. This is where I got stuck.
    - If I click "Open Object" one file is opened in Photoshop and I can save it as a Smart Object. This works but is very slow for 50-100 images. Also, I found a bug that truncates the filename so I have to manually fix each one.
    - If I click "Save Image" the images save as regular images, not as smart objects. The "Save Image..." button apparently saves only regular images, not smart objects, and I can't find any way to change the label to "Save Object..." or otherwise change the mode.
    I've set the options at the bottom to "Open in PhotoShop as Smart Objects" (as I said, the Open command will create the smart object) but can't anyway to make the "Save Image" command actually save objects.
    Is there a way to do this or is it a limitation with smart objects in ACR?
    Environment: PS CS3, ACR 4.2, Bridge 2.1, Windows XP 64 bit with all updates installed for each.

    Sorry, I guess I need to explain better.
    I wrote a script to do this, but here is this portion of the workflow:
    1. Open CR2 file in ACR and make adjustments.
    2. Open as Smart Object in PS.
    3. Script Events Manager activates this script on Document Open, checks to see if it was opened as a Smart Object. We'll assume it did.
    4. The script asks me if I want to make another layer. I pick yes. The script copies the SO layer, sets an inverted mask, and opens to edit settings in ACR again.
    5. I adjust the settings for that layer in ACR and click OK.
    The script will keep looping between 4 and 5 as long as I pick YES.
    This gives me more local control of areas. If I want to bring out eyes a bit, I can up contrast, saturation, sharpness, brightness, exposure, or whatever looks best for the eyes in ACR, then unmask the eyes as much as I want on that layer in Photoshop. There is more data to pull from in the RAW file vs trying to do the same thing within Photoshop.
    Opening as a regular image file then converting to a SO doesn't give me the same control. I would have to reopen the file separately, make the adjustments in ACR, open to PS then copy that document and paste as a new layer in the original.
    Duplicating the document might work also, but I can also just save as .psd at that point since I'd have to know the path name by then anyway. I'll give that a try, though, and see if it might work better. The only catch with the save part is it slows me down waiting for it to write the file and if I have 5+ SO layers, it takes awhile. Once I unmask where I want, I flatten to a rasterized layer and continue.
    Thanks

  • Cannot open raw image as smart object from ACR 8.4

       Hi
      I just noticed that I am not able to open an image as a smart object from ACR 8.4. The tooltip says I can by holding down the shift key but doing so has no effect. I reset all my preferences to make sure but that hasn't fixed the problem.
      Thanks
      J

    I thought it was the Alt (Opt) key that did that.  I'll go check
    No, you are right.  It is Shift, and it is working OK for me with 8.4 Windows 7

  • Vector smart object from PS to AI

    Hi...
    System: Win XP, CS4
    Is it possible to copy a vector smart pbject from PS to AI? Note from PS to AI? HAve tried dragging and dropping... it doesn't seem to work.

    If I'm understanding your original question, this answer is not correct. I had the same question as your original. "copying a vector smart object from PS to AI?"
    This is the problem I was having and I only found one way to solve it. Would love it if someone could give me a quicker workflow. My solution seem tedious.
    RECAP:
    Problem: Vector object was originally created in photoshop and I want to bring it into AI as vector art.
    Answer:
    1. Convert the "vector object" in Photoshop to a "Smart Object" by selecting the layer, then go to Layer > Smart Objects > Convert to Smart Object
    2. Double-click on the smart object's icon in the layers palette. This opens the object in a new Photoshop window
    3. Choose File > Export > Paths to Illustrator... (Note: With the smart object layer selected, you can switch over to the "Paths" tab and see your object's editable path and name)
    Again, I may have misunderstood your original question, but what I've listed here is the only way I've been able to bring a vector object originated in Photoshop over to Illustrator. Pain in the ***.

  • How do I remove an object from the foreground of a photo eg a fence?

    How do I remove an object from the foreground of a photo eg a fence?

    What version of Photoshop?
    If CC then try here
    Learn Photoshop CC | Adobe TV

Maybe you are looking for

  • How do I connect my imac 2008 to my tv?

    I have an 2008 imac os x 10.8 Leopard and want to connect it to my TV. What exactly do I need beside the VGA cord? I need the proper adaptor for my imac, but which one and will it support sound. My VGA cable has a sound cable attached.

  • Can I set a reminder to follow up on a specific email later?

    I am using Mail as my email client with Google as the service. I want to be able to set a reminder to follow up on a specific email on a certain day and time. Is this possible? Thank you. Loyal.

  • Error message; messages sitting in Outbox

    I have been trying to send some e-mails today but I keep getting an error message that says, "This message could not be delivered and will remain in your outbox until it can be delivered. The server 'smtp.mac.com' cannot be contacted on port 587." I

  • Problem downloading iPod software...

    I need to restore my iPod, as it is not working properly. When I connect to iTunes (the latest version), the Restore screen comes up because right away it says that my iPod has become corrupt and needs to be restored... ...so, I click the "Restore" b

  • SAP query - SQ01 distinct rocord

    Hi, I created a join with VBAK and VBAP tables. We are trying to get distinct sales order document number based on sales order line item details. Currently query output is listing sales document number repeated for input. How we can get a list output