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

Help with the option param TOGGLE (Solved)

Wed May 13, 2020 11:47 am

OK guy, here I am bugging you one more time :hehe
Help me understand the TOGGLE param. I'm creating a Planet plugin and I want to make and user choice in the plugin dialog box for a "Lens Flare" to use it or not. How to I write this last part?

I already know how to write the param and have made it appear on the dialog box (PF_BOOL, "sunLayer", "Sun Flare", TRUE), but is not making any change. Thank you in advanced!

Re: Help with the option param TOGGLE

Wed May 13, 2020 12:03 pm

In almost all my filters, the registration has a user parameter to flatten or not the image:
(PF_TOGGLE, "flatten", "Flatten Image?", False),

The filter definition has something like
def AcryLook(....... doFlatten) :

In the filter process normally at end there is a statement which says something like:
if (doFlatten == True): final = pdb.gimp_image_flatten(newImage)
Post a reply