Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

Script passes a 0 to the Displace plugin, and apparently it's an issue

Fri Jan 22, 2021 8:55 pm

So, I've been going through some of the older <Image>/File/Create/Logo scripts from 2.6 (I know, kind of useless, but I find it fun), and I've come across more than a few that I was able to get working with just a modification of the value that was being passed to a plugin (like bump-map needing float values rather than an integer greater than 1, that kind of thing), and more of them work with 2.10 out of the box than don't. But there are a couple, such as the crystal-logo script that have been giving me guff. I don't know the Displace plugin well enough to know what the issue is by just looking at the values. Here's the line of scheme that's causing the problem:

(plug-in-displace RUN-NONINTERACTIVE img layer2 displace displace TRUE TRUE disp-map disp-map 0)

That zero is reported by GIMP to be 'out of bounds', and it throws an error that halts the script because of it. Anyone know what parameter that zero represents and what it might possibly need to be to make it work?

EDIT: I figured it out. It represented the Displace Mode, which apparently USED to start at 0, but now begins with 1.
Post a reply