Converting to smart object from script
Hi,
Is it possible to run a script to convrt empty layer into smart object from the plugin. I am using code from https://forums.adobe.com/thread/1088193?q=script to run the script. Following is my script. I recorded this using ScriptingListener plugin.
// =======================================================
var idMk = charIDToTypeID( "Mk " );
var desc3 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref1 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
ref1.putClass( idLyr );
desc3.putReference( idnull, ref1 );
executeAction( idMk, desc3, DialogModes.NO );
// =======================================================
var idnewPlacedLayer = stringIDToTypeID( "newPlacedLayer" );
executeAction( idnewPlacedLayer, undefined, DialogModes.NO );
I'm getting following error.
