Copy link to clipboard
Copied
I'm trying to write a lightroom classic plugin. One of the steps is to copy metadata from one photo to another.
I'm using :
newPhoto:setRawMetadata("keywords", oldPhoto:getRawMetadata("keywords"))
but it throws the error.
Also "title" is an unrecognized metadata key even though it apears in the sdk docs.
Copy link to clipboard
Copied
"but it throws the error."
What's the error?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]
According to the API docs, photo:setRawMetadata() doesn't support the key "keywords":
Instead, use photo:addKeyword() and removeKeyword().
Copy link to clipboard
Copied
[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]
""title" is an unrecognized metadata key even though it apears in the sdk docs."
Use photo:getFormattedMetadata() rather than getRawMetadata():
Copy link to clipboard
Copied
There is no setFormattedMetadata, how do I set title? I couldn't just move the photos so I'm copying, reimporting and copying metadata. Title is one of the important fields for me.
Copy link to clipboard
Copied
Some fields you retrieve with getFormattedMetadata(), some with getRawMetadata(). But you set all fields using setRawMetadata().
Copy link to clipboard
Copied
Thank you for your help. I was able to finish my plugin. What is the software you're using in the screenshots you posted? It looks like it would be helpful.