Question
How to "add layer mask"
Hi, i readed all JavaScript Reference but now found function to add mask to layer, can anyone have solution to this?
PS I have some solution(i got it through scriptlistener.8bi):
"
var id21 = charIDToTypeID( "Mk " );
var desc4 = new ActionDescriptor();
var id22 = charIDToTypeID( "Nw " );
var id23 = charIDToTypeID( "Chnl" );
desc4.putClass( id22, id23 );
var id24 = charIDToTypeID( "At " );
var ref2 = new ActionReference();
var id25 = charIDToTypeID( "Chnl" );
var id26 = charIDToTypeID( "Chnl" );
var id27 = charIDToTypeID( "Msk " );
ref2.putEnumerated( id25, id26, id27 );
desc4.putReference( id24, ref2 );
var id28 = charIDToTypeID( "Usng" );
var id29 = charIDToTypeID( "UsrM" );
var id30 = charIDToTypeID( "RvlA" );
desc4.putEnumerated( id28, id29, id30 );
executeAction( id21, desc4, DialogModes.NO );
"
Mb there is another solution not such hard to understand and write?
PS I have some solution(i got it through scriptlistener.8bi):
"
var id21 = charIDToTypeID( "Mk " );
var desc4 = new ActionDescriptor();
var id22 = charIDToTypeID( "Nw " );
var id23 = charIDToTypeID( "Chnl" );
desc4.putClass( id22, id23 );
var id24 = charIDToTypeID( "At " );
var ref2 = new ActionReference();
var id25 = charIDToTypeID( "Chnl" );
var id26 = charIDToTypeID( "Chnl" );
var id27 = charIDToTypeID( "Msk " );
ref2.putEnumerated( id25, id26, id27 );
desc4.putReference( id24, ref2 );
var id28 = charIDToTypeID( "Usng" );
var id29 = charIDToTypeID( "UsrM" );
var id30 = charIDToTypeID( "RvlA" );
desc4.putEnumerated( id28, id29, id30 );
executeAction( id21, desc4, DialogModes.NO );
"
Mb there is another solution not such hard to understand and write?
