先选择纯色图层

var res =
    "palette { 
    A: Button { text:'修改固态层尺寸' } 
}";

var win = new Window(res);
win.show();

var button = win.A;

var w = 1920,
    h = 1080;


function setSolidLayerSize() {
    var solidLayer = app.project.activeItem.selectedLayers[0];
    solidLayer.source.width = w;
    solidLayer.source.height = h;
    return solidLayer;
}

button.onClick = function () {
    setSolidLayerSize();
}

Leave a Reply

Your email address will not be published.