Quoting Mark McLaren <mark.mcla...@gmail.com>:
> 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