Akkana Peck wrote:
> I'd like a way of bringing up a Save-as or Export-as dialog
> from a Python script. There's no API for this currently, as far
> as I can tell.
The Save and Export dialogs are rather tightly coupled to the core
currently so it will not be trivial to extend the plug-in API to show
and interact these dialogs but I would not reject patches that
implemented it properly.
> Would be be possible to add an API for this, or maybe an optional
> argument in gimp_file_save and the corresponding _export function?
IMO we should not reuse gimp_file_save() for this but instead introduce
gimp_show_save_dialog() and gimp_show_export_dialog(). I am a bit
worried however that plug-ins will abuse this power. In your case, why
do you need to show these dialogs? Isn't it better if the user has to go
through a single place to save or export?
> In the new framework, will gimp_file_save() fail if the filename isn't
No, the existing API needs to be backwards compatible so even though it
is unfortunate that _save() can be used to export, we need to allow that
for the sake of backwards compatibility.
Gimp-developer mailing list