• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

photo:addkeyword why catalog:createkeyword is exists

Explorer ,
Mar 10, 2024 Mar 10, 2024

Copy link to clipboard

Copied

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 )

 

TOPICS
SDK

Views

34

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation