Mobile app version of vmapp.org
Login or Join
Michele215

: Photoshop javascript, how to select contents of a layer Is there a method for the following function (mac) Command-click on thumbnail in layer panel? (So all non empty pixels get selected in

@Michele215

Posted in: #Javascript #PhotoshopScripting

Is there a method for the following function (mac) Command-click on thumbnail in layer panel? (So all non empty pixels get selected in specified layer.)

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Michele215

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ogunnowo857

Here's a function that uses scriptlistener code to select all the pixels in the current layer

function selectLayerPixels()
{
// =======================================================
var id710 = charIDToTypeID( "setd" );
var desc168 = new ActionDescriptor();
var id711 = charIDToTypeID( "null" );
var ref128 = new ActionReference();
var id712 = charIDToTypeID( "Chnl" );
var id713 = charIDToTypeID( "fsel" );
ref128.putProperty( id712, id713 );
desc168.putReference( id711, ref128 );
var id714 = charIDToTypeID( "T " );
var ref129 = new ActionReference();
var id715 = charIDToTypeID( "Chnl" );
var id716 = charIDToTypeID( "Chnl" );
var id717 = charIDToTypeID( "Trsp" );
ref129.putEnumerated( id715, id716, id717 );
desc168.putReference( id714, ref129 );
executeAction( id710, desc168, DialogModes.NO );
}

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme