Copy link to clipboard
Copied
I would like to create a plugin for new metadata. I would like the value for the metadata not to be editable in LR (only by the plugin). But I would like to be able to copy (and then paste elsewhere) its value (in LR). It seems that for the moment we have only two choices with the "readOnly" boolean: "When true, the field is visible in the Metadata panel, but not editable by the user." The true option does not allow to copy the value of the metadata.
Do I have missed something?
Copy link to clipboard
Copied
I don't think you've missed anything.
The plugin could define two commands, Copy and Paste, for copying and pasting the values. The user could then assign keyboard shortcuts to those two commands.
Another hacky way of doing this: The plugin could define two custom metadata fields Copy and Paste, each with type "url" and each readonly, with these same values set for every photo managed by the plugin:
lightroom://<plugin-id>/copy
lightroom://<plugin-id>/paste
When displayed in the plugin's custom tagset in the Metadata panel, there will be "->" buttons to the right of the Copy and Paste fields that the user can click. (This is the only way a plugin can get a clickable button displayed in a custom tagset for the Metadata panel.)
The plugin would define URL handlers for those URLs (see page 26 of the SDK Guide). The handlers would invoke the copy and paste functionality for the currently selected photo(s).