Re: [Gimp-user] Newbie needs help making batch reflect script
Quoting Mark McLaren : > To create a batch reflection script I have tried taking a copy of > script-autocrop, changed the definition name to match the new filename > and changed the "plug-in-autocrop" line so that it call the reflection > plugin instead, like this: > > (script-fu-gimp-reflection RUN-NONINTERACTIVE image drawable 30 100 > FALSE TRUE) > > If I run it, I get the following error: > > GIMP-Error: Calling error for procedure 'gimp-file-save': > Procedure 'gimp-file-save' has been called with an invalid ID for > argument 'draw > able'. Most likely a plug-in is trying to work on a layer that doesn't > exist any longer. The original call to 'plug-in-autocrop' does not alter the value for 'drawable'. Whatever layer was passed to the plug-in still exists (though it gets cropped). However, the reflection script destroys the original layer passed to it -- merging it with the other layers to produce a new layer. This means the 'drawable' argument you passed to the script will no longer be valid after the script has returned, and you need to set the value of 'drawable' to a valid layer. Hopefully, the script leaves the appropriate layer active when it returns so that you can use 'gimp-image-get-active-layer' to set 'drawable' properly. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Newbie needs help making batch reflect script
I realized that this wasn't particularly descriptive. My failing script looks like this: (define (script-reflect filename) (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) (drawable (car (gimp-image-get-active-layer image (script-fu-gimp-reflection RUN-NONINTERACTIVE image drawable 30 100 FALSE TRUE) (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename) (gimp-image-delete image))) Thank you for any help, Mark On Mon, Jul 5, 2010 at 11:40 PM, Mark McLaren wrote: > Hi all, > > I am a Script-Fu and Scheme newbie; please forgive my ignorance. I am > trying add reflection to a batch of PNG files using the GIMP reflection > plugin from: > > http://registry.gimp.org/node/1025 > > I have previously been able to batch re-size my PNG files using a > script-autocrop script that I found on the GimpTalk forum. > > http://www.gimptalk.com/forum/script-autocrop-p265988.html > > To create a batch reflection script I have tried taking a copy of > script-autocrop, changed the definition name to match the new filename and > changed the "plug-in-autocrop" line so that it call the reflection plugin > instead, like this: > > (script-fu-gimp-reflection RUN-NONINTERACTIVE image drawable 30 100 FALSE > TRUE) > > If I run it, I get the following error: > > GIMP-Error: Calling error for procedure 'gimp-file-save': > Procedure 'gimp-file-save' has been called with an invalid ID for argument > 'draw > able'. Most likely a plug-in is trying to work on a layer that doesn't exist > any > longer. > > batch command experienced an execution error > > What am I doing wrong? Any assistance is appreciated. > > Many thanks, > > Mark > > OS: winxp > GIMP: 2.6.8 > -- "Paradoxically, the more time saving abstractions you are using the more you actually have to know." - Simon Willison ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Newbie needs help making batch reflect script
Hi all, I am a Script-Fu and Scheme newbie; please forgive my ignorance. I am trying add reflection to a batch of PNG files using the GIMP reflection plugin from: http://registry.gimp.org/node/1025 I have previously been able to batch re-size my PNG files using a script-autocrop script that I found on the GimpTalk forum. http://www.gimptalk.com/forum/script-autocrop-p265988.html To create a batch reflection script I have tried taking a copy of script-autocrop, changed the definition name to match the new filename and changed the "plug-in-autocrop" line so that it call the reflection plugin instead, like this: (script-fu-gimp-reflection RUN-NONINTERACTIVE image drawable 30 100 FALSE TRUE) If I run it, I get the following error: GIMP-Error: Calling error for procedure 'gimp-file-save': Procedure 'gimp-file-save' has been called with an invalid ID for argument 'draw able'. Most likely a plug-in is trying to work on a layer that doesn't exist any longer. batch command experienced an execution error What am I doing wrong? Any assistance is appreciated. Many thanks, Mark OS: winxp GIMP: 2.6.8 ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user