Why can't I do "layer.kind = LayerKind.SMARTOBJECT;"?
i want save each image layer psd separately, , if image has effect or opacity < 100%, needs converted smartobject layer , rasterized (so becomes "layerkind.normal" layer effect, rasterized).
i can in 2 clicks, when try scripting, alert saying "artlayers can't converted smartobjects". think makes no sense, because can right-clicking layer selecting "create smartobject", whatever...
is there workaround this?
i can in 2 clicks, when try scripting, alert saying "artlayers can't converted smartobjects". think makes no sense, because can right-clicking layer selecting "create smartobject", whatever...
is there workaround this?
you have use scriptlistener this...
executeaction( stringidtotypeid('newplacedlayer'), undefined, dialogmodes.no );
rasterizesmart();
function rasterizesmart() {
var desc201 = new actiondescriptor();
var ref89 = new actionreference();
ref89.putenumerated( charidtotypeid('lyr '), charidtotypeid('ordn'), charidtotypeid('trgt') );
desc201.putreference( charidtotypeid('null'), ref89 );
desc201.putenumerated( charidtotypeid('what'), stringidtotypeid('rasterizeitem'), stringidtotypeid('placed') );
executeaction( stringidtotypeid('rasterizelayer'), desc201, dialogmodes.no );
};
More discussions in Photoshop Scripting
adobe
Comments
Post a Comment