Copy link to clipboard
Copied
I need to set some custom metadata created from one plugin, but I need to set the data from another plugin.
It says in the guide to use the photo:setPropertyForPlugin( _PLUGIN
, fieldId, value, optVersion )
I need to use the _PLUGIN object, but is there a way to get this from a totally different plugin?
Copy link to clipboard
Copied
Unfortunately, there's no way using the SDK to get the _PLUGIN object for another plugin. So there's no way for one plugin to set custom metadata of another plugin.
However, it is possible for one plugin to read another plugin's custom metadata, using photo:getRawMetadata ("customMetadata").
Copy link to clipboard
Copied
Is this still true?
So there's no way for one plugin to set custom metadata of another plugin.
Copy link to clipboard
Copied
Plugins are isolated from each other, so one plugin can not change metadata for other.
It is doable, it just depends on how much you really need this.
The solution is to "ask" plugin to change it's metadata by itself.
Here is one of the solutions that comes to mind.
The plugin that needs metadata changed should start task at Lightroom startup and listen on socket for some commands and process them as they come.
Another plugin connects to that socket and sends comands to change metadata (or whatever) for the first plugin.
You'll have to come up with some simple protocol for this communication.
It is doable, but not the easiest thing to do honestly.