Re: [Gimp-user] script-fu-save-anim-layers

2008-10-19 Thread Sven Neumann
Hi,

On Sat, 2008-10-18 at 21:46 -0400, Alec Burgess wrote:

  This is explained in the release notes for GIMP 2.6:
  http://gimp.org/release-notes/gimp-2.6.html
 
 Thanks ... I think :-) found the example and perused the linked PDF
 (section 4.2.2. Binding constructs) with out much if any
 understanding.
 
 I changed:
 (define (save-layer orig-image layer name)
 (let* (
 (image)
 (buffer)
 )
 
 to:
 (define (save-layer orig-image layer name)
 (let* (
 (this-is-correct 0)
 (image)
 (buffer)
 )

The proper fix would have been to use:

(let* (
 (image -1)
 (buffer -1)
 )
 
The point is the variables need to be initialized on definition. I have
chosen to initialize them to -1 in this example as that is the value
that is used for an invalid image or buffer ID in GIMP.


Sven


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


Re: [Gimp-user] script-fu-save-anim-layers

2008-10-19 Thread Kevin Cozens
Alec Burgess wrote:
 Thanks ... I think :-) found the example and perused the linked PDF 
 (section 4.2.2. Binding constructs) with out much if any understanding.
 
 I changed:
 (define (save-layer orig-image layer name)
 (let* (
 (image)
 (buffer)
 )
 
 to:
 (define (save-layer orig-image layer name)
 (let* (
 (this-is-correct 0)
 (image)
 (buffer)
 )

You didn't need to read the linked PDF file. That is there for reference in 
case someone doubted whether the Scheme interpreter in Script-Fu is doing the 
right thing regarding the let* blocks.

The release notes should have made it perfectly clear as to the problem and 
its fix. Since it appears the note about Script-Fu isn't clear enough I will 
think about some changes to the information. In the meantime, Sven has pointed 
out the needed changes to the script that were referred to in the release notes.

-- 
Cheers!

Kevin.

http://www.ve3syb.ca/   |What are we going to do today, Borg?
Owner of Elecraft K2 #2172  |Same thing we always do, Pinkutus:
 |  Try to assimilate the world!
#include disclaimer/favourite |  -Pinkutus  the Borg
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] script-fu-save-anim-layers

2008-10-19 Thread Alec Burgess

Alec Burgess wrote:

Since we've had all these messages about this ... I thought I'd ask:

Shouldn't the so-called fix I made, adding a dummy variable with a 
value but leaving the remaining two variables (image) and (buffer) 
uninitialized still have been a syntax error? I was  surprised that it 
in fact actually made the script work.


Kevin Cozens wrote:

Alec Burgess wrote:
  
Thanks ... I think :-) found the example and perused the linked PDF 
(section 4.2.2. Binding constructs) with out much if any understanding.


I changed:
(define (save-layer orig-image layer name)
(let* (
(image)
(buffer)
)

to:
(define (save-layer orig-image layer name)
(let* (
(this-is-correct 0)
(image)
(buffer)
)



You didn't need to read the linked PDF file. That is there for reference in 
case someone doubted whether the Scheme interpreter in Script-Fu is doing the 
right thing regarding the let* blocks.


The release notes should have made it perfectly clear as to the problem and 
its fix. Since it appears the note about Script-Fu isn't clear enough I will 
think about some changes to the information. In the meantime, Sven has pointed 
out the needed changes to the script that were referred to in the release notes.


--
Regards ... Alec   ([EMAIL PROTECTED]  WinLiveMess - [EMAIL PROTECTED])

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


[Gimp-user] script-fu-save-anim-layers

2008-10-18 Thread Alec Burgess
Script: 
http://flashingtwelve.brickfilms.com/GIMP/Scripts/save-anim-layers.scm
(apparently by Saul Goode 3/11/2008)

This script was mentioned in bugzilla:
Bug 556548 – Layer extraction script 
http://bugzilla.gnome.org/show_bug.cgi?id=556548

Attempts to execute it result in:

Error while executing script-fu-save-anim-layers:
Error: Bad syntax of binding spec in let* : ((image) (buffer))

I think this is due to changes in script-fu (?) but don't know enough 
about script-fu to correct it. Could someone help?

Also ... in the script comments, its not clear which directory/folder 
the files will be created?

-- 
Regards ... Alec   ([EMAIL PROTECTED]  WinLiveMess - [EMAIL PROTECTED])

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


Re: [Gimp-user] script-fu-save-anim-layers

2008-10-18 Thread Sven Neumann
Hi,

On Sat, 2008-10-18 at 18:19 -0400, Alec Burgess wrote:

 Error while executing script-fu-save-anim-layers:
 Error: Bad syntax of binding spec in let* : ((image) (buffer))
 
 I think this is due to changes in script-fu (?) but don't know enough 
 about script-fu to correct it. Could someone help?

This is explained in the release notes for GIMP 2.6:
http://gimp.org/release-notes/gimp-2.6.html


Sven


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


Re: [Gimp-user] script-fu-save-anim-layers

2008-10-18 Thread saulgoode
Script has been updated.

Quoting Alec Burgess [EMAIL PROTECTED]:

 Script:
 http://flashingtwelve.brickfilms.com/GIMP/Scripts/save-anim-layers.scm
 (apparently by Saul Goode 3/11/2008)

 This script was mentioned in bugzilla:
 Bug 556548 – Layer extraction script
 http://bugzilla.gnome.org/show_bug.cgi?id=556548

 Attempts to execute it result in:

 Error while executing script-fu-save-anim-layers:
 Error: Bad syntax of binding spec in let* : ((image) (buffer))

 I think this is due to changes in script-fu (?) but don't know enough
 about script-fu to correct it. Could someone help?

 Also ... in the script comments, its not clear which directory/folder
 the files will be created?

 --
 Regards ... Alec   ([EMAIL PROTECTED]  WinLiveMess - [EMAIL PROTECTED])

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




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