Skip to main content
Inspiring
March 10, 2024
Question

photo:addkeyword why catalog:createkeyword is exists

  • March 10, 2024
  • 0 replies
  • 101 views

I'm trying to understand the addkeyword, when renaming my images I need to preserve the keywords, label and caption.

It works, but I endup with double keywords (if they are embedded in the file), and why the need of cataloging:createkeyword()  if the keyword already exists in Lightroom.

So it seems that I need to create a function to compare the old keywords versus the renamed file.

 

--------- Get current metadata ---------
keywordTags = photo:getFormattedMetadata("keywordTags")
label = photo:getFormattedMetadata("label")
caption = photo:getFormattedMetadata("caption")

 

--- Set metadata back ----

photo:addKeyword(keywordTags )

gives an error -> assertion failed!

 

So first

cataloging:createkeyword() 

photo:addKeyword(keywordTags )

 

This topic has been closed for replies.