Why: 1) users can install .scm scripts to plug-ins dir 2) Crashing scripts do not crash extension-script-fu Scripts (.scm files) have a shebang and are executable and in a same-named subdir of plugin dir. Interpreter/scripts create PDB procs of type PLUGIN unlike extension-script-fu which creates PDB procs of type TEMPORARY, owned by extension-script-fu. Unlike other interpreters, the interpreter is-a plugin outright, not by virtue of the script subclassing GimpPlugin and using GI. More details in /plug-ins/script-fu/interpreter/README
31 lines
956 B
Scheme
31 lines
956 B
Scheme
; !!! No shebang here
|
|
|
|
; Test a second .scm file in the same directory as a queried .scm.
|
|
; The second .scm file need not be executable.
|
|
; The second .scm file need not have a shebang.
|
|
; The gimp-script-fu-interpreter will nevertheless load the second .scm
|
|
; while it is querying the first, executable .scm in the dir.
|
|
; The plugin manager queries the first executable,
|
|
; and gimp-script-fu-interpreter loads (and returns defined names in)
|
|
; the second during the query of the first.
|
|
|
|
; Expect "Test>Test SF interpreter 3" in the menus
|
|
; Expect when chosen, message on GIMP message bar.
|
|
|
|
; plug-ins/test1/test1.scm is executable
|
|
; plug-ins/test1/test3.scm is NOT executable
|
|
|
|
(define (script-fu-test3)
|
|
(gimp-message "Hello script-fu-test3")
|
|
)
|
|
|
|
(script-fu-register "script-fu-test3"
|
|
"Test SF interpreter 3"
|
|
_"Just gives a message from Gimp"
|
|
"lkk"
|
|
"lkk"
|
|
"2022"
|
|
"" ; all image types
|
|
)
|
|
|
|
(script-fu-menu-register "script-fu-test3" "<Image>/Test")
|