Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script-fu V3 plug-ins
#1
Just a heads up that if a Script-fu script is implemented as a V3 plug-in you can edit the script file whilst GIMP is running - you don't have to restart GIMP for the changes to take effect. This has been possible with Python scripts for a long time but disappeared when the Refresh Scripts menu option was dropped some time ago. It certainly makes debugging Script-fu scripts much less frustrating :-)

V3 .scm scripts that are plug-ins go into folders with the same names as the first part of the .scm file name (i.e. the part before .scm). These folders then go into the GIMP plug-ins folder, not the scripts folder.

Don't forget to delete the original version of the .scm file from scripts - GIMP complains if there is a plug-in and a script version at the same time.

The following links are useful when making .scm plug-ins - note in particular the use of 
Code:
#!/usr/bin/env gimp-script-fu-interpreter-3.0

at the top of the file

and 
Code:
(script-fu-use-v3)

at the start of the main function.

https://developer.gimp.org/resource/scri...deprecated

https://testing.developer.gimp.org/resou...script-fu/
Reply
#2
IMHO you could beef this up a bit and I would move it to the tutorial section (or you write directly in the tutorials and ask me to erase this when done).
Reply
#3
Maybe a link to Mark Sweeney's Tutorials could be added:
https://script-fu.github.io/funky/hub/tutorials/folder/
Reply
#4
(02-28-2025, 12:35 AM)Ofnuts Wrote: IMHO you could beef this up a bit and I would move it to the tutorial section (or you write directly in the tutorials and ask me to erase this when done).
I think that Mark's tutorial does this far better than I could - my main point in raising this was to highlight the removal of the pain in the backside of having to restart GIMP each time you made a change to a .scm script.
Reply
#5
(02-28-2025, 05:36 PM)programmer_ceds Wrote:
(02-28-2025, 12:35 AM)Ofnuts Wrote: IMHO you could beef this up a bit and I would move it to the tutorial section (or you write directly in the tutorials and ask me to erase this when done).
I think that Mark's tutorial does this far better than I could - my main point in raising this was to highlight the removal of the pain in the backside of having to restart GIMP each time you made a change to a .scm script.

I'm not sure you ever needed to do this. See Filters > Script-fu > Refresh scripts, and in the bad cases you kill the script server and restart it.

In fact I remember a brawl with a script-fu fundamentalist citing this need for restart as being the major problem with Python script (which it wasn't obviously) compared to script-fu.

Note that in any case you will have to restart Gimp if you change the registration part of your script-fu/python-fu. And as I understand it, you know have both "classic"  scripts in the script server (as in 2.10) and scheme plugins, so things are going to be complicated to explain to end users?
Reply
#6
(02-28-2025, 06:00 PM)Ofnuts Wrote: I'm not sure you ever needed to do this. See Filters > Script-fu > Refresh scripts, and in the bad cases you kill the script server and restart it.

That used to be the case and it normally worked but the Refresh Scripts option disappeared after 2.10.38 - hence my post that, with .scm plug-ins, not only was the removal of Refresh scripts no longer an issue things were better than back in V2.10.38 in as much as you no longer even have to waste time refreshing the scripts.
Reply


Forum Jump: