We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function setLayerIconColor(color) { var cTID = function(s) { return app.charIDToTypeID(s); }; var sTID = function(s) { return app.stringIDToTypeID(s); }; var colors = { red: 'Rd ', orange: 'Orng', yellow: 'Ylw ', green: 'Grn ', blue: 'Bl ', violet: 'Vlt ', purple: 'Vlt ', gray: 'Gry ', grey: 'Gry ' }; var desc1 = new ActionDescriptor(); var ref1 = new ActionReference(); ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt')); desc1.putReference(cTID('null'), ref1); var desc2 = new ActionDescriptor(); desc2.putEnumerated(cTID('Clr '), cTID('Clr '), cTID(colors[color] || 'None')); desc1.putObject(cTID('T '), cTID('Lyr '), desc2); executeAction(cTID('setd'), desc1, DialogModes.NO); }; // 设置为红色 setLayerIconColor('red');
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Reference
The text was updated successfully, but these errors were encountered: