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