When you write a Gimp plugin in Python, either you do your whole interactive UI with PyGTK, or you let Gimp auto-generate a dialog to collect parameters from the user before calling you. Of course the second solution is a bit less user-friendly(*) but in many scripts, doing the whole UI would represent the larger and most complex part of the code. (*) though not as bad as it looks, you can normally expect passed image/layers/files/colors to exist since they have been specified using specific dialogs. On 5/12/19 5:50 PM, Michal Vašut wrote:
You should IMHO prevent performing an operation when the input is invalid. Yes, it's definitely easier to throw an exception, but those are IMHO rather to deal with some unexpected errors. On Sat, May 11, 2019, 23:44 Ofnuts <ofnuts@xxxxxxx <mailto:ofnuts@xxxxxxx>> wrote: If the plugin is for public use, gimp.message() is a better solution because it will display in a dialog box or in the Gimp message console depending on user preferences. You don't really need to drag in all the GTK support just to display an error message. On the other hand, I don't see how you pass a list of files to a plugin.. If this is a batch script, things are a bit different, but then there may be no UI at all, and the message would be better printed to the console.
_______________________________________________ gimp-developer-list mailing list List address: gimp-developer-list@xxxxxxxxx List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list List archives: https://mail.gnome.org/archives/gimp-developer-list