Javascript: convert layer to smart object in Photoshop?

This script converts the active layer to an intelligent object:

createSmartObject(app.activeDocument.activeLayer);
function createSmartObject(layer)
{
    var idnewPlacedLayer = stringIDToTypeID( 'newPlacedLayer' );
    executeAction(idnewPlacedLayer, undefined, DialogModes.NO);
}

My question is: is there a shorter way to code this?

+4
source share

Source: https://habr.com/ru/post/1660839/


All Articles