Copy link to clipboard
Copied
Hi,
I used screen listener to create a function which applies layer style to a group.
Is there a way to produce a list of all layer styes, currently loaded/existing in the application?
I what to check if the style exist before applying it.
function applyStyleToGroup(style) {
var c2t = function (s) {
return app.charIDToTypeID(s);
};
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
var descriptor = new ActionDescriptor();
var reference = new ActionReference();
var reference2 = new ActionReference();
reference.putName( s2t( "style" ), style);
descriptor.putReference( c2t( "null" ), reference );
reference2.putEnumerated( s2t( "layer" ), s2t( "ordinal" ), s2t( "targetEnum" ));
descriptor.putReference( s2t( "to" ), reference2 );
descriptor.putBoolean( s2t( "group" ), true );
executeAction( s2t( "applyStyle" ), descriptor, DialogModes.NO );
}//applyStyleToGroup
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi,
It working very well.
I create a script and in one of the stages the user can choose to add a layer style by writing the layer style name.
I noticed that it only works for local styles.
Is there a way to apply styles from the user creative cloud library as well?
Dan
Copy link to clipboard
Copied
I do not use Adobe Cloud Storage. I would think a cloud files is a file that is in many places. In Adobe Cloud storage and on users local machine in their shared libraries and these library files are synced by Adobe Cloud software. To be able to use a cloud style in Photoshop I would believe you would need to load it into you Photoshop style Palette which would add it into your Photoshop Preferences. There it would be useable and more or less static. If the style is changed in the cloud you would need to delete from your palette and reload the one from your library. I would think you can use the Preset manager to maintain you Style Platte. Again I do not use Adobe Cloud Libraries newer versions of Creative cloud Photoshop version may be able to maintain thing your load from Adobe cloud libraries.