2.99 Plugins: Palette to Gradient fails, GeglColor signature change
Environment/Versions
- GIMP version: latest
- Package: self-built
- Operating System: Linux
Description of the bug
Plugin "Palette to Gradient" fails with:
Writing dirty data '/work/.home/.config/GIMP/2.99/gradients/Bgold.ggr'
Traceback (most recent call last):
File "/usr/local/lib/x86_64-linux-gnu/gimp/2.99/plug-ins/palette-to-gradient/palette-to-gradient.py", line 91, in run
gradient = make_gradient(palette, num_segments, num_colors)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/x86_64-linux-gnu/gimp/2.99/plug-ins/palette-to-gradient/palette-to-gradient.py", line 50, in make_gradient
_, color_left = palette.entry_get_color(color_number)
^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable Color object
Note the last line is significant, this is a Python trace in reverse order from a C trace.
and then the plugin fails to return values:
(python-fu-palette-to-gradient:547): LibGimp-WARNING **: 10:13:45.738: _gimp_procedure_run_array: no return values, shouldn't happen
Plugin python-fu-palette-to-gradient: GLib: CRITICAL: g_error_new: assertion 'domain != 0' failed
GLib (pid:547): [E]xit, show [S]tack trace or [P]roceed: (gimp-2.99:239):
Reproduction
Is the bug reproducible?
Reproduction steps:
- Open the Palettes dockable
- RMB on a palette, expect a pop-up menu
- Choose "Palette to Gradient"
…
Expected result: gradient created
Actual result: fails
Additional information
Recently a signature change on gimp-palette-entry-get-color, now returning a GeglColor, was returning two values.
Also: Gradient>Save as CSS
Traceback (most recent call last):
File "/usr/local/lib/x86_64-linux-gnu/gimp/2.99/plug-ins/gradients-save-as-css/gradients-save-as-css.py", line 149, in gradient_css_save
success, lcolor, lopacity = gradient.segment_get_left_color(index)
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable Color object
and changed signature for gimp-gradient-segment-get-left-color
Edited by Lloyd Konneker