Чтобы подтвердить опасение?Вся надежда на форумных профи.
//removeLayerText.jsx
var docRef = app.activeDocument;
LayersScan0(Doc);
function LayersScan0(Doc)
{
var i;
var L;
{
for(i=0; i < docRef.layers.length; i++)
{
L = Doc.layers[i];
if (L.kind == LayerKind.TEXT)
{
if (L.visible==false) { L.visible = true; Doc.activeLayer = L; L.remove();}
}
else
{
if(L.typename == "LayerSet")
{
LayersScan0(L);
}
else
{
if (L.visible==false) { L.visible = true; Doc.activeLayer = L; L.remove();}
}
}
}
}
(function disableTxtInSets ( lays ) {
for ( var i = 0; i < lays.length; i++ ) {
if ( lays[ i ].typename == "LayerSet" ) {
disableTxtInSets ( lays [ i ].layers );
} else if ( lays[ i ].kind == LayerKind.TEXT && lays[ i ].parent.typename == "LayerSet" ) {
lays[ i ].visible = false;
}
}
}) ( activeDocument.layers );
(function removeTxtInSets ( lays ) {
for ( var i = 0; i < lays.length; i++ ) {
if ( lays[ i ].typename == "LayerSet" ) {
removeTxtInSets ( lays [ i ].layers );
} else if ( lays[ i ].kind == LayerKind.TEXT && lays[ i ].parent.typename == "LayerSet" ) {
lays[ i ].remove ();
i--;
}
}
}) ( activeDocument.layers );
var lays = app.activeDocument.layers;
disableTxtInSets(lays);
function disableTxtInSets ( lays ) {
for ( var i = 0; i < lays.length; i++ ) {
if ( lays[ i ].typename == "LayerSet" ) {
disableTxtInSets ( lays [ i ].layers );
} else if ( lays[ i ].kind == LayerKind.TEXT && lays[ i ].parent.typename == "LayerSet" ) {
lays[ i ].visible = false;
}
}
}