Gimp-Forum.net

Full Version: Conditional PF_OPTION ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to create conditional options for PF_ commands?

For instance, I have various scripts where a selection is saved to a channel for future use. What I would like to be able to do is give the user the option, at the start, as to whether the selection is re-instated after the plug-in is run, but not appear if a selection is not present.

At the moment this is a hypothetical question, but the answer may be helpful to other people.
Not if you use the auto-generated dialogs. When the dialog appears, your code hasn't been called yet.

If there are other options, why would you worry. If this is a matter of having a dialog or not because of a single parameter, nothing prevents you from registering two entries, one with a parameter and one without.