plug-ins: Fix Palette and Gradient functions

Resolves #11083

Per bootchk, changes in function calls to
palette_entry_get_color () and 
gradient_segment_get_left_color () were
broken in Python scripts due to GelColor
being used post Color Space Invasion.
This patch fixes the calls and returns.
This commit is contained in:
Alx Sa
2024-03-21 13:06:39 +00:00
parent 59b6c8fc8f
commit 3233aed0dc
2 changed files with 16 additions and 13 deletions

View File

@ -47,10 +47,10 @@ def make_gradient(palette, num_segments, num_colors):
color_number_next = 0
else:
color_number_next = color_number + 1
_, color_left = palette.entry_get_color(color_number)
_, color_right = palette.entry_get_color(color_number_next)
gradient.segment_set_left_color( color_number, color_left, 100.0)
gradient.segment_set_right_color(color_number, color_right, 100.0)
color_left = palette.entry_get_color(color_number)
color_right = palette.entry_get_color(color_number_next)
gradient.segment_set_left_color(color_number, color_left)
gradient.segment_set_right_color(color_number, color_right)
# Side effects on the context. Probably not what most would expect.
Gimp.context_set_gradient(gradient)