Multiple (minor) Issues regarding future GIMP-3 Plugin API
GIMP 2.99.2, Windows 8.
Thanks GIMP devs for this amazing release. Except for a few annoyances, it is looking really good. What impressed me the most was how dramatically the load time for Python scripts has been reduced.
Here are a few minor issues I came across during early trials:
drawable.list_children()appears to be a duplicate of
In Lua binding,
Gimp.LayerModeobject. For the sake of consistency, it should return
Gimp.LayerModeobject, just like Python binding does.
There's no uniform or consistent pattern followed by getter functions. Some of them return objects, others return literals and still others return objects packed in a tuple.
def N_(message): return messageat line
goat-exercise-py3.pyseems redundant. It is literally returning the parameter it receives, without doing any modification or causing any side-effects.
Lack of consistency in how different objects are created. For example, a color-tag can be created directly and intuitively via
Gimp.ColorTag(Gimp.ColorTag.RED); however, this same intuitive approach is not adopted in creating colors. We are required to call a blank constructor first, like
x = Gimp.RGB()and then follow up with
x.set(r, g, b). Needless to say, the second approach is non-conforming to basic Object-Oriented principles.
Enum value of Layer-Mode or Paint-Mode is available via a magic method
__index__. It should be accessible via a regular method or property.
The status of Vala is unclear. Scripts for Scheme with the old API, and Python and Lua with the new API can be created and used, but there are no instructions on how Vala scripts can be created/used. Should we feed them to
gimptool-2.99.exefor registration, compilation, etc?
I know that the API is a work-in-process and things are going to change a lot. Nonetheless, I thought I should share these points with you to help you better understand the perspective of an average plugin-user/creator.