Copy link to clipboard
Copied
I am trying to write to a custom metadata field.
I am using photo:setPropertyForPlugin, and I cannot seem to get the action to work.
plugin id - geeky.snapshot
plugin field - gRecentPubDate
var - local variable with value
When I use the following
photo:setPropertyForPlugin("geeky.snapshot", "gRecentPubDate" , var)
I get the error that the first paramenter must be the _pluginID object
When I use the following:
photo:setPropertyForPlugin(geeky.snapshot, gRecentPubDate , var)
I get the error that attempt to index global "geeky" (a nil value)
Do I need to declare the pluginID somewhere other than the info.lua file?
TIA
[This post contains embedded images that don't appear in email. View the post in your Web browser to see the images.]
The API reference says the first object must be of type _PLUGIN:
That's a slight typo -- it should read "LrPlugin". The API reference for LrPlugin indicates there's just one way to get a LrPlugin object, using the global variable _PLUGIN:
So use _PLUGIN as the first argument.
[Use the blue reply button under the first post to ensure replies sort properly.]
Copy link to clipboard
Copied
[This post contains embedded images that don't appear in email. View the post in your Web browser to see the images.]
The API reference says the first object must be of type _PLUGIN:
That's a slight typo -- it should read "LrPlugin". The API reference for LrPlugin indicates there's just one way to get a LrPlugin object, using the global variable _PLUGIN:
So use _PLUGIN as the first argument.
[Use the blue reply button under the first post to ensure replies sort properly.]
Copy link to clipboard
Copied
I just updated my reply to include the correct second screenshot. Look at the reply in your Web browser, not your email reader.
[Use the blue reply button under the first post to ensure replies sort properly.]
Copy link to clipboard
Copied
Do I need to declare the LRPlugin namespace as well?
Copy link to clipboard
Copied
No, just reference _PLUGIN.
[Use the blue reply button under the first post to ensure replies sort properly.]
Copy link to clipboard
Copied
Awesome, that worked