The problem is that this is extreeemely slow, so I'm wondering if there is any way to make this faster? Also, is there an easy way to be able to see a progressbar when running the function?
Code: Select all
// FUNCTION: APPLY FONT CHANGES
function fnChangeAntiAlias(target)
{
// Get the layers of the active document
var docLayers = target.layers;
// For each layer in the document
for (var i = 0; i < docLayers.length; i++)
{
// If the current layer is a LayerSet
if (docLayers[i].typename == "LayerSet")
{
// Recursive: Re-run function with the current LayerSet as target
fnChangeAntiAlias(docLayers[i]);
}
// Else if the current layer is a text layer
else if (docLayers[i].kind == LayerKind.TEXT)
{
docLayers[i].textItem.antiAliasMethod = AntiAlias.SMOOTH];
};
};
};
// Get the active document
var doc = app.activeDocument;
// Execute the function
fnChangeAntiAlias(doc);