[Gimp-user] what's with the auto-insert of run-mode as the first arg for script-fu methods?



Using gimp 2.6
I originally defined my script-fu procedure as

(define (my-proc fileExpr)
  ...
)

and registered it using:

(script-fu-register
  "my-proc"
  ...
  ""                                             ; image type the script works on
  SF-STRING       "FileNameExpression"    "" 
)

But the procedure browser lists it as taking two args,
the first of which is 
  run-mode  INT32  Interactive, non-interactive

In order to get it to work, I had to change the definition to:

(define (my-proc runMode fileExpr)
  ...
)

but left the registration as is (without run-mode).

What's the deal with the auto-insert of run-mode in the procedure browser help,
and do I have to define it as an arg in the registration?
If so, what is its type?  
(I tried SF-RUN-MODE and it didn't like that)
If I leave it as is and try to use it from the menu 
instead of the script-fu console,
There's no place to enter the run-mode in the dialog which pops up,
and it feeds the string first arg in as the run-mode and barfs.

totally confused, looking for some enlightment...



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]