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?
"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
...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.
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?
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.
Copy link to clipboard
Copied
Thanks so much for the clarification