Restore gimp-edit-foo PDB procedures as convenience functions
This is a reminder to, before 3.0, revisit whether the PDB API should have convenience functions to lessen impact on third-party plugin authors porting their plugins to 3.0.
In 2.10, gimp-edit-copy (-cut, -paste) took a single drawable. Now (2.99.10) they support multilayer selection, and take (Int num_drawables, GimpObjectArray drawables). This required changes to calls to said procedures, in plugins in the GIMP repo.
This also may require changes in third-party plugins. I believe said procedures are frequently used in plugins. About 1/6 of the scripts in GIMP required this change.
The needed changes are verbose, for example in Scheme:
(gimp-edit-copy drawable) => (gimp-edit-copy 1 (vector drawable))
And even more verbose for gimp-edit-paste.
The proposal is to keep gimp-edit-foo procedures, with the old signature, as convenience functions. And to add a more general function with a new name, e.g. gimp-edit-copy-selected-drawables. Convenience meaning: a function that could instead be done by another function having more parameters, but where the combination of parameters is so frequently used (in this case "1 (vector drawable)") that the convenience function omits those parameters, so-to-speak.
It is not unusual to have convenience functions in an API. You can look back at GIMP 2.0 and say "there should have been a more general function in the API" (supporting multilayer selection), but you could also say "oh, they started with a convenience function, no reason to obsolete convenience functions."
Alternatively, you could palliate this in ScriptFu with compatibility code to "fixup" calls using the old API. But that doesn't help Python authors.
Related:
Issue #6026 (closed) contains old discussion.
Issue #5919 discusses a related issue, that the PDB API does not need to pass the length of arrays.