I'm attempting to make a script that will combine two images into one image, and I'd like to display a list of open images when the user runs the script. The problem I'm having is that I can't figure out how to keep the menu options updated, because the registration function only runs when the scripts are updated.
For example, if I open 4 images, refresh scripts, close the images, then run my script, I will see the menus showing the 4 images that were open at the time that scripts were refreshed.
Here's my registration function. (list-images) returns a list of image names and (list-blend-modes) returns the list of available blend modes.
"Merges one image on top of another with the specified blend mode."
"GNU General Public License"
SF-OPTION "Bottom Image" (list-images)
SF-OPTION "Top Image" (list-images)
SF-OPTION "Merge Type" (list-blend-modes)
Does anyone know a way around this issue, or am I going to have to go learn how to write plugins if I want to do this sort of thing?