Quoting Kevin Cozens <ke...@ve3syb.ca>:

> 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)

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  

Gimp-user mailing list

Reply via email to