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

Does custom plugin metadata need to be defined in a LrMetadataProvider file?

New Here ,
Feb 26, 2025 Feb 26, 2025

Copy link to clipboard

Copied

I am trying to use custom plugin-specific metadata on a per-photo basis. In the API reference for "setPropertyForPlugin" it states that metadata set using this function does not need to be declared anywhere. However, when I attempt to run a script I get an error that reads "attempt to access property that's not declared in Info.lua". Currently I do not have a metadata scheme defined nor a LrMetadataProvider file specified in my Info.lua file. I would like this metadata to only be viewable and editable from within the scope of my plugin. Did I misread the API reference stating that these metadata fields don't need to be declared? Do I need to specify my metadata id in an LrMetadataProvider file?

TOPICS
SDK

Views

162
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

correct answers 1 Correct answer

LEGEND , Feb 26, 2025 Feb 26, 2025

"I am trying to use custom plugin-specific metadata on a per-photo basis."

 

catalog:setPropertyForPlugin() sets per-catalog custom fields, and as you read, they don't need to be declared.

 

But you want per-photo custom fields, for which you must use photo:setPropertyForPlugin(), and you have to declare them via Info.lua.

 

"I would like this metadata to only be viewable and editable from within the scope of my plugin."

 

Per-photo custom fields are viewable in the Metadata panel with the All Plug-in M

...

Votes

Translate
LEGEND ,
Feb 26, 2025 Feb 26, 2025

Copy link to clipboard

Copied

"I am trying to use custom plugin-specific metadata on a per-photo basis."

 

catalog:setPropertyForPlugin() sets per-catalog custom fields, and as you read, they don't need to be declared.

 

But you want per-photo custom fields, for which you must use photo:setPropertyForPlugin(), and you have to declare them via Info.lua.

 

"I would like this metadata to only be viewable and editable from within the scope of my plugin."

 

Per-photo custom fields are viewable in the Metadata panel with the All Plug-in Metadata tagset, and any other plugin can read those fields as well.

Votes

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
New Here ,
Feb 26, 2025 Feb 26, 2025

Copy link to clipboard

Copied

I see, thank you for the response. So to clarify, a field set with the photo:setPropertyForPlugin() function will be viewable by other plugins, but cannot be accessed or modified by other plugins. This being in contrast to the photo:setRawMetadata() function which would be viewable and editable by other plugins?

Votes

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
LEGEND ,
Feb 27, 2025 Feb 27, 2025

Copy link to clipboard

Copied

"a field set with the photo:setPropertyForPlugin() function will be viewable by other plugins, but cannot be accessed or modified by other plugins."

 

Correct.

 

"This being in contrast to the photo:setRawMetadata() function which would be viewable and editable by other plugins?"

 

Correct.

Votes

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
New Here ,
Feb 28, 2025 Feb 28, 2025

Copy link to clipboard

Copied

LATEST

Thanks so much for the clarification

Votes

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