How to convert a layer to a smart object

Is there a way to convert a layer to a smart object?
batchplay or photoshop other apis

Hi,

this should work (got it with Alchemist):

const batchPlay = require("photoshop").action.batchPlay;
const result = batchPlay(
[
   {
      "_obj": "newPlacedLayer",
      "_isCommand": true,
      "_options": {
         "dialogOptions": "dontDisplay"
      }
   }
],{});

Or just

const batchPlay = require("photoshop").action.batchPlay;
await batchPlay(
    [{
        "_obj": "newPlacedLayer",
    }], {});
1 Like

Thanks tomzag and Pierre.