Error on script-fu

ForumsFor GIMP users ► Error on script-fu

Sent: 2009-06-24 09:05:16 UTC (over 2 years ago)

From: Didier Bretin

Error on script-fu

Hi,

I'm new to the world of script-fu writing, and I'm trying to make a
script for repetitive actions I need to make.

Here is my script:
(define (make-pion-3d image calque)
(let *
(
(newCalque (car (gimp-layer-copy calque TRUE)))
)
(gimp-image-add-layer image newCalque 0)
(script-fu-add-bevel 0 image newCalque 30 FALSE FALSE)
)
)

(script-fu-register
"make-pion-3d"
"Make pion 3D"
"Creates a 3D pion"
"Didier Bretin"
"Didier Bretin"
"2009"
""
SF-IMAGE "Image" 0
SF-DRAWABLE "Calque du pion" 0
)
(script-fu-menu-register "make-pion-3d" "/Xtns/Script-Fu/Pion")

And when I try to apply it on a layer, I got the following error:
Erreur d'exécution « Make pion 3D » :
Error: Procedure execution of gimp-image-get-active-drawable failed on
invalid input arguments: La procédure « gimp-image-get-active-drawable »
a été appelée avec un ID erroné pour le paramètre « image ». Très
probablement un greffon est en train d'essayer de travailler sur une
image qui n'existe plus.

The french error message tells that I use a false ID for the parameter
"image". Probably a script is trying to work on a image that doesn't
exist anymore.

Any idea which error I make ?

Regards.

--
Didier Bretin
http://bretin.net/
http://twitter.com/didier69

_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply to this message

Sent: 2009-06-24 15:15:10 UTC (over 2 years ago)

From: saulgoode@flashingtwelve.brickfilms.com

Error on script-fu

Quoting Didier Bretin :

> And when I try to apply it on a layer, I got the following error:
> Erreur d'exécution « Make pion 3D » :
> Error: Procedure execution of gimp-image-get-active-drawable failed on
> invalid input arguments: La procédure « gimp-image-get-active-drawable »
> a été appelée avec un ID erroné pour le paramètre « image ». Très
> probablement un greffon est en train d'essayer de travailler sur une
> image qui n'existe plus.

It would seem you are executing the script with no image open. I would
recommend moving the command from the /Xtns menu to the
/Filters menu, and also using a constraint of "*" (in the line
just before SF-IMAGE ...). This will ensure that an image exists when
the script is executed.

_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply to this message

Sent: 2009-06-30 13:23:20 UTC (over 2 years ago)

From: Jochen Cichon

Autostart script

Is it possible to do an autostart script on gimp...

something that e.g. minimize the empty image or even move it out of my
viewport...

--
joschi

_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply to this message

Sent: 2009-07-03 21:36:30 UTC (over 2 years ago)

From: Didier Bretin

Error on script-fu

Hi,

Nobody can help me with this issue ?

I searched on the web, but I can't find an example which can help me
with this :(.

Thanks for your help or tips.

Didier Bretin wrote:
> Hi,
>
> I'm new to the world of script-fu writing, and I'm trying to make a
> script for repetitive actions I need to make.
>
> Here is my script:
> (define (make-pion-3d image calque)
> (let *
> (
> (newCalque (car (gimp-layer-copy calque TRUE)))
> )
> (gimp-image-add-layer image newCalque 0)
> (script-fu-add-bevel 0 image newCalque 30 FALSE FALSE)
> )
> )
>
> (script-fu-register
> "make-pion-3d"
> "Make pion 3D"
> "Creates a 3D pion"
> "Didier Bretin"
> "Didier Bretin"
> "2009"
> ""
> SF-IMAGE "Image" 0
> SF-DRAWABLE "Calque du pion" 0
> )
> (script-fu-menu-register "make-pion-3d" "/Xtns/Script-Fu/Pion")
>
>
> And when I try to apply it on a layer, I got the following error:
> Erreur d'exécution « Make pion 3D » :
> Error: Procedure execution of gimp-image-get-active-drawable failed on
> invalid input arguments: La procédure « gimp-image-get-active-drawable »
> a été appelée avec un ID erroné pour le paramètre « image ». Très
> probablement un greffon est en train d'essayer de travailler sur une
> image qui n'existe plus.
>
> The french error message tells that I use a false ID for the parameter
> "image". Probably a script is trying to work on a image that doesn't
> exist anymore.
>
> Any idea which error I make ?
>
> Regards.

--
Didier Bretin
http://bretin.net/
http://twitter.com/didier69
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply to this message

Sent: 2009-07-03 21:41:50 UTC (over 2 years ago)

From: Michael Schumacher

Error on script-fu

Didier Bretin wrote:

> Nobody can help me with this issue ?

What about the first reply you got - didn't this help?

Michael

--
GIMP > http://www.gimp.org | IRC: irc://irc.gimp.org/gimp
Wiki > http://wiki.gimp.org | .de: http://gimpforum.de
Plug-ins > http://registry.gimp.org |
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply to this message

Sent: 2009-07-03 23:08:31 UTC (over 2 years ago)

From: Didier Bretin

Error on script-fu

Michael Schumacher wrote:
> Didier Bretin wrote:
>
>> Nobody can help me with this issue ?
>
> What about the first reply you got - didn't this help?

Not at all. Now my plugin is in the right menu, but I have the same error.

--
Didier Bretin
http://bretin.net/
http://twitter.com/didier69
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply to this message

Sent: 2009-07-03 23:25:05 UTC (over 2 years ago)

From: saulgoode@flashingtwelve.brickfilms.com

Error on script-fu

Quoting Didier Bretin :

> Nobody can help me with this issue ?

You should report back on whether a suggestion works, else people
might assume all is copacetic.

Looking deeper at your script, the problem is with the call which adds
the bevel:

>> (script-fu-add-bevel 0 image newCalque 30 FALSE FALSE)

When a Script-fu calls another Script-fu, you need to omit the
RUN-MODE (when calling a plug-in though, the RUN-MODE is needed). Your
call should be emended to:

>> (script-fu-add-bevel image newCalque 30 FALSE FALSE)

_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply to this message

Sent: 2009-07-04 08:23:38 UTC (over 2 years ago)

From: Didier Bretin

Error on script-fu

saulgoode@flashingtwelve.brickfilms.com wrote:
> You should report back on whether a suggestion works, else people
> might assume all is copacetic.

Yes you are right, sorry ;).

> Looking deeper at your script, the problem is with the call which adds
> the bevel:
>
>>> (script-fu-add-bevel 0 image newCalque 30 FALSE FALSE)
>
> When a Script-fu calls another Script-fu, you need to omit the
> RUN-MODE (when calling a plug-in though, the RUN-MODE is needed). Your
> call should be emended to:
>
>>> (script-fu-add-bevel image newCalque 30 FALSE FALSE)

Great it works !

I will look deeper in the documentation to see if it's write somewhere.

Thanks again for the answer.

--
Didier Bretin
http://bretin.net/
http://twitter.com/didier69
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply to this message

Welcome!


Lost password?

Not a member? Sign up!

Random tutorials | Latest tutorials

  1. Creating a simple Company Logo Creating a simple Company Logo 24
  2. Smoke and Flames Smoke and Flames 21
  3. Creating a bloody splatter texture Creating a bloody splatter texture 36
  4. Create sparkle on any object! Create sparkle on any object! 25

Latest comments

2.6.12 crashes on startup in windows xp. 2.6.11 works fine. (2 days ago in Last stable 2.6 release: 2.6.12 has arrived)

Thank you! You really helped! The tutorial went great for me! Tha... (5 days ago in [AVATAR] Become a real Na'Vi using GIMP!)

maybe you still selected a channel or so? explicitly click a layer ... (5 days ago in Create cool rifts with translucent lights!)

Poll

Is GIMP an adequate application for you to create printed graphics like flyers, advertisments etc?

View results

Latest forum activities

Your Ad Here

facts & numbers

gimpusers.com RSS feed

48 identi.ca followers
748 Twitter followers

powered by bitfire it services