05-05-2024, 01:45 PM
(05-03-2024, 09:32 PM)Ofnuts Wrote: The image argument is passed when the plugin is called from the UI, not when the plugin is registered. If you have 10 images open, the plugin can be applied to each image by activating a view on the image (image windows or tabs) and then calling the plugin from the menu or a shortcut. Likewise the plugin automatically sets the "drawable" argument to the current active drawable of the current image.
However, an external process cannot determine the current image, if this is your problem (and anyway it could have changed in between....). So you probably want to send the image ID to your external process with the rest of the data so that it can use it to retrieve the image for which it was called later.
Yes, that is the method that I have used. But since the plugin is always active, I have to have the Menu plugin send the Gimp Image to the external script (Prism), and then have Prism send it back to the looping function plugin for processing in Gimp. It is working, but would be much easier and cleaner if there was an API to get the current image.
But this seems to be working without an error - which is nice. And it is invisible to the user so that's all that matters.
Thanks for the help!
J.