05-05-2024, 07:30 PM
(05-05-2024, 01:56 PM)Ofnuts Wrote:(05-05-2024, 01:45 PM)JBreckeen Wrote: 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.
That would be very dangerous... You start the processing on some image, and while your process runs, the active image changes for any reason, so when the result comes back it would be applied to the new active image and not the image it was intended for. Your current scheme is more robust...
True, but I think it would be more of a gimp.image_get_current() that would be a reference to that image object, just as the PF_IMAGE does - just like any other object instance. It is actually safer than determining the image by indirect methods such as image_list().
But don't want to complain too much, as I am just happy Gimp has such an extensive API, though quirky.