Copy link to clipboard
Copied
Hello,
I need help creating an action in photoshop that can rate my file 5 stars. I know how to register an action, then apply it. But when I save the action, go to Files > Info, rate 5 stars with the mouse, then ok. The action is saved but when I want to apply it to a file, the 5 tars are not added to file info. I also tried to record the action by applying a Metadata Template which gives 5 stars. But the result is the same, the action is saved but when I apply it to another file, the 5 stars do not apply.
To test, I created an action by adding text in the info (example the mention of the copyright), in this case, the mention applies well when the action is executed.
Is there a particular technique ? Did I miss something ?
@Vlad275433052wzn – Try this Photoshop script:
/*
Add 5 Star Rating in Photoshop.jsx
https://community.adobe.com/t5/photoshop-ecosystem-discussions/action-rating-5-stars/m-p/13416151
*/
#target photoshop
if (documents.length) {
if (ExternalObject.AdobeXMPScript === undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var xmp = new XMPMeta(activeDocument.xmpMetadata.rawData);
xmp.deleteProperty("http://ns.adobe.com/xap/1.0/", "Rating");
xmp.setP
...
Copy link to clipboard
Copied
I'll need to test an action. It could be scripted, however, Adobe Bridge is the right tool for the job if the only purpose is to add a rating.
Copy link to clipboard
Copied
I think I have to make a script because with actions it doesn't work. I would like to be able to apply the 5 star ratings in Photoshop automatically, because my process is as follows: I rate the raw files that I am interested in in Lightroom (3 stars), then I send these files to be edited in photoshop, once the files are modified, they are automatically saved in my Lightroom library. I would like these files, when they go back to Lightroom, to be rated 5 stars without me having to do it manually in Photoshop. I hope to find a solution.
Copy link to clipboard
Copied
@Vlad275433052wzn – Try this Photoshop script:
/*
Add 5 Star Rating in Photoshop.jsx
https://community.adobe.com/t5/photoshop-ecosystem-discussions/action-rating-5-stars/m-p/13416151
*/
#target photoshop
if (documents.length) {
if (ExternalObject.AdobeXMPScript === undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var xmp = new XMPMeta(activeDocument.xmpMetadata.rawData);
xmp.deleteProperty("http://ns.adobe.com/xap/1.0/", "Rating");
xmp.setProperty("http://ns.adobe.com/xap/1.0/", "Rating", "5");
activeDocument.xmpMetadata.rawData = xmp.serialize();
} else {
alert("A document must be open!");
}
Copy link to clipboard
Copied
Stephen, thank you very much, everything is working perfectly. Thanks for your help.
Have a nice day
Copy link to clipboard
Copied
You're welcome, happy to help.