Skip to main content
Inspiring
June 4, 2026
Answered

How to determine in Photoshop whether the current layer is a manually converted smart object, a placed embedded object, a placed linked smart object, or a vector smart object?

  • June 4, 2026
  • 4 replies
  • 69 views

How to determine in Photoshop whether the current layer is a manually converted smart object, a placed embedded object, a placed linked smart object, or a vector smart object? The properties of these smart objects are almost identical, and I'm having trouble figuring out how to distinguish between them. I'd appreciate it if someone could enlighten me on this. Thank you.

    4 replies

    Stephen Marsh
    Community Expert
    Community Expert
    June 5, 2026

    This script reports on Generative smart object, linked smart object or embedded smart object.

    I haven’t looked at Vector smart object (presuming placed .ai or .eps or .pdf).

     

    // Check Test Get Property for Linked Embedded Generative Fill Smart Object Layer.jsx

    /* Based on:
    https://stackoverflow.com/questions/63010107/get-a-smart-objects-layers-files-directory-source-in-jsx

    https://community.adobe.com/t5/photoshop-ecosystem-discussions/is-there-a-quot-simple-quot-way-to-export-all-generation-variations/m-p/14442568
    */

    #target photoshop

    if (app.activeDocument.activeLayer.kind == LayerKind.SMARTOBJECT) {
    var ref = new ActionReference();
    ref.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
    var layerDesc = executeActionGet(ref);
    ref.putProperty(charIDToTypeID("Prpr"), stringIDToTypeID("smartObject"));
    ref.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
    var so = executeActionGet(ref).getObjectValue(stringIDToTypeID("smartObject"));
    var soMoreDesc = layerDesc.getObjectValue(stringIDToTypeID('smartObjectMore'));

    if (soMoreDesc.hasKey(stringIDToTypeID('generativeDocInfo')) === true) {
    alert("Generative Fill Smart Object Layer");
    } else if (so.getBoolean(stringIDToTypeID("linked")) === true) {
    alert("Linked Smart Object Layer");
    } else {
    alert("Embedded Smart Object Layer");
    }
    } else {
    alert("The layer isn't a Smart Object");
    }

     

    Inspiring
    June 5, 2026

    I can tell whether a smart object is a vector smart object by checking the file extension of its corresponding source path, such as .ai and .svg.

    Stephen Marsh
    Community Expert
    Community Expert
    June 5, 2026

    Great, that would have been my approach without digging into AM code, which I’m not very good at.

    Stephen Marsh
    Community Expert
    Community Expert
    June 5, 2026

    @w30290083o9nn 

     

    What is the context? I.E.: If you were scripting and needed different processing of an embedded vs. linked smart object layer? The old forum software allowed one to label a post as “actions & scripting” to give some context if it wasn’t clear by the subject or body content.

     

    ”manually converted smart object, a placed embedded object”

     

    AFAIK, both result in the same layer content, properties etc., which is an embedded smart object.

     

    It might not be possible to find that out post creation of the layer.

    w30290083o9nnAuthorCorrect answer
    Inspiring
    June 5, 2026
    Stephen Marsh
    Community Expert
    Community Expert
    June 5, 2026

    @w30290083o9nn 


    So the context is scripting (ExtendScript).

    Nancy OShea
    Community Expert
    Community Expert
    June 4, 2026

    It’s incumbent upon Photoshop users to give their Layers meaningful labels while they work. 

     

     

     

    Nancy O'Shea— Product User & Community Expert
    Inspiring
    June 5, 2026

    🤝

    Conrad_C
    Community Expert
    Community Expert
    June 4, 2026

    I’m not sure if Photoshop has a way of distinguishing all of those without actually opening each smart object. The only distinction I know about is the different icons in the Layers panel for embedded or linked smart objects. In other words, I think the current UI can tell you only about what kind of link it is, not what kind of content is in it.

     

     

    It would be nice if we could see the level of detail that you can in Adobe InDesign, Illustrator, Premiere, or After Effects, which have panels that can describe the nature of imported content in detail. In Photoshop, the Properties tells you, again, only about the link type (and path, for linked smart objects).

     

    Inspiring
    June 5, 2026

    Thank you