You are here

Script-Fu and plug-in-applylens

Hi. I need some help. How do I get the applylens plug-in to work from within a Script-Fu script. I'd like to apply "Glass effects > Apply lens" on an existing image with the script.
Any ideas / help welcome.

Forums: 

  1. Start The GIMP
  2. Click "Xtns"
  3. Select "Procedure Browser"
  4. Type "lens" into search box
  5. Hit the "enter"-key

Seems a tiny little bit odd to me that this wasn't mentioned in one of the plug-writing-tutorials that u surely have red...

hth 

Actually, I've done that. That's exactly where my prob lies... if I use it with the syntax provided, it doesn't work. And as to the "help" provided, both with Gimp and online... I've not found any...

Sorry if i soundet a bit harsh...

So, what exactly is your prob? I've just tried it, and i see no real trouble. "keep_surroundings" is an INT32 instead of BOOL as in the GUI? Just give it a 0 or 1. Ok, i've done it in perl, 'cause my experience with lisp (or scheme) is rather limited ('cause i don't like it), but it shouldn't be harder to do...

My prob is basically this. I can't get script-fu to do plug-in-applylens. It keeps throwing out errors. Granted, I've not yet tried replacing the TRUE's with 1s. Will try it and let know.

Ok. I've tried it. Still no go.

... if you'd supply some more info, like

  • What exactly are those err-msgs
  • Which script causes 'em on which gimp-version (you could attach it at the first post of this thread)

Also, if you have gimp-perl, use that. I find it much more convienient, 'cause its run like a plugin, meaning you can edit scripts in place without ever having to restart the gimp (on linux, that is. No idea 'bout windoze)...

Unfortunately, the dumb software here doesn't allow attachements on comments, otherwise i would have posted the little perl-script mentioned in a previous post...

I ran the filter from the Script-fu console using the following command: (plug-in-applylens RUN-NONINTERACTIVE ;; run-mode       1 ;; Image #, is "1" for first image opened       (car (gimp-image-get-active-layer 1)) ;; layer       1.7 ;; refraction index       TRUE ;; keep surroundings       FALSE ;; don't set background       FALSE ;; don't set transparency       )
Subscribe to Comments for "Script-Fu and plug-in-applylens"