OM Wiki

Technical Artist Wiki

ユーザ用ツール

サイト用ツール


adobe:adobe_photoshop:select_layer_by_index

インデックスからレイヤーを選択するスクリプト

sample.jsx
function selectLayerByIndex(index,add){ 
	add = (add == undefined)  ? add = false : add;
 var ref = new ActionReference();
    ref.putIndex(charIDToTypeID("Lyr "), index);
    var desc = new ActionDescriptor();
    desc.putReference(charIDToTypeID("null"), ref );
	      if(add) desc.putEnumerated( stringIDToTypeID( "selectionModifier" ), stringIDToTypeID( "selectionModifierType" ), stringIDToTypeID( "addToSelection" ) ); 
      desc.putBoolean( charIDToTypeID( "MkVs" ), false ); 
	  try{
    executeAction(charIDToTypeID("slct"), desc, DialogModes.NO );
}catch(e){}
};
adobe/adobe_photoshop/select_layer_by_index.txt · 最終更新: 2021/05/03 19:17 by ochiaimitsuo

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki