RSS/Atom feed Twitter
Site is read-only, email is disabled

Error while executing script (Script Stop Working in Windows 2.6.3)

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

mailman.1.1229284802.10981.... 07 Oct 20:19
  Gimp-user Digest, Vol 75, Issue 20 D.Jones (aka) Capnhud 15 Dec 11:27
  Error while executing script (Script Stop Working in Windows 2.6.3) D.Jones (aka) Capnhud 15 Dec 11:29
D.Jones (aka) Capnhud
2008-12-15 11:27:27 UTC (about 16 years ago)

Gimp-user Digest, Vol 75, Issue 20

Quoting Kevin Cozens :

Your code has "(if (= inSmooth TRUE) 1 0)"

where in Smooth is a boolean value

provided by the SF-TOGGLE. The "=" operator

is for use when

comparing numbers,
not booleans. Since inSmooth is a boolean, change your

if statement to read

(if inSmooth 1 0)

saulgoode wrote:

I am using version 2.6.4 on Linux and my experience is that

the
original script functions just fine for both TRUE and FALSE values of
'inSmooth'; however, if I modify the script per your instructions then
the smoothing occurs even for FALSE values of inSmooth. This is as I
would expect because SF-TOGGLEs are marshalled as integer constants in
the PDB interface, not booleans (correct me if I am mistaken).

I would ask Capnhud to verify whether the modified script produces the
correct result after removing the '=' comparison (not just that no
errors are generated). This can be done by running the script on an
image consisting of only two colors, setting the number of segments to
"2", and disabling smoothing. The resulting gradient should be a
hard-edged transition between the two colors (as shown in this image:
http://www.flashingtwelve.brickfilms.com/Temp/anomaly.png ).

When used, SF-TOGGLEs are invariably initialized to the integer
constants TRUE and FALSE in existing scripts. If there has been a
change whereby SF-TOGGLE are now booleans then this would seem very
problematic.

If I leave the script it original form I get the error that has been mentioned. However as saulgoode has pointed out the script may not return an error per se, but no matter what it does not produce the intended result if smoothing is disabled. The resulting gradient will be smooth if only 2 segments are chosen and smoothing is disabled. So the question becomes what is making the script not produce the correct result?

D.Jones (aka) Capnhud
2008-12-15 11:29:54 UTC (about 16 years ago)

Error while executing script (Script Stop Working in Windows 2.6.3)

Quoting Kevin Cozens :

Your code has "(if (= inSmooth TRUE) 1 0)"

where in Smooth is a boolean value

provided by the SF-TOGGLE. The "=" operator

is for use when

comparing numbers,
not booleans. Since inSmooth is a boolean, change your

if statement to read

(if inSmooth 1 0)

saulgoode wrote:

I am using version 2.6.4 on Linux and my experience is that

the
original script functions just fine for both TRUE and FALSE values of
'inSmooth'; however, if I modify the script per your instructions then
the smoothing occurs even for FALSE values of inSmooth. This is as I
would expect because SF-TOGGLEs are marshalled as integer constants in
the PDB interface, not booleans (correct me if I am mistaken).

I would ask Capnhud to verify whether the modified script produces the
correct result after removing the '=' comparison (not just that no
errors are generated). This can be done by running the script on an
image consisting of only two colors, setting the number of segments to
"2", and disabling smoothing. The resulting gradient should be a
hard-edged transition between the two colors (as shown in this image:
http://www.flashingtwelve.brickfilms.com/Temp/anomaly.png ).

When used, SF-TOGGLEs are invariably initialized to the integer
constants TRUE and FALSE in existing scripts. If there has been a
change whereby SF-TOGGLE are now booleans then this would seem very
problematic.

If I leave the script it original form I get the error that has been mentioned. However as saulgoode has pointed out the script may not return an error per se, but no matter what it does not produce the intended result if smoothing is disabled. The resulting gradient will be smooth if only 2 segments are chosen and smoothing is disabled. So the question becomes what is making the script not produce the correct result?