Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Currently Active Image
#5
(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.
Reply


Messages In This Thread
Currently Active Image - by JBreckeen - 05-01-2024, 02:54 PM
RE: Currently Active Image - by Ofnuts - 05-02-2024, 07:33 AM
RE: Currently Active Image - by JBreckeen - 05-03-2024, 12:11 PM
RE: Currently Active Image - by Ofnuts - 05-03-2024, 09:32 PM
RE: Currently Active Image - by JBreckeen - 05-05-2024, 01:45 PM
RE: Currently Active Image - by Ofnuts - 05-05-2024, 01:56 PM
RE: Currently Active Image - by JBreckeen - 05-05-2024, 07:30 PM

Forum Jump: