var desc = new ActionDescriptor();
ref = new ActionReference();
ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
desc = executeActionGet(ref);
var layerName = desc.getString(charIDToTypeID( 'Nm ' ));
var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
var layerType = typeIDToStringID(desc.getEnumerationValue(stringIDToTypeID( 'layerSection' )));
var isLayerSet =( layerType == 'layerSectionContent') ? false:true;
this part is to check if layer is a layerSet, how to check if layer is text layer??
how to check if layer is a text layer
-
pfaffenbichler
how to check if layer is a text layer
If it’s just one Layer DOM code should do fine (app.activeDocument.activeLayer.kind) and the time factor should be negligible.
-
jhexcore
how to check if layer is a text layer
i just found out.
if(desc.hasKey(stringIDToTypeID('textKey')))
it will return true if layer is a text layer.
if(desc.hasKey(stringIDToTypeID('textKey')))
it will return true if layer is a text layer.