Skip to main content
Participant
March 16, 2018
Question

Set Plugin Custom Metadata from a different plugin? _PLUGIN object?

  • March 16, 2018
  • 1 reply
  • 527 views

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?

This topic has been closed for replies.

1 reply

johnrellis
Legend
March 16, 2018

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"). 

Inspiring
February 6, 2024

Is this still true? 

So there's no way for one plugin to set custom metadata of another plugin.

Inspiring
February 6, 2024

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.