Plugin curve-bend and GimpDoubleArray

I want to use plugin-curve bend in a python script.

How do I specify the GIMPDoubleArrays for the points?

What I have is this:

procedure = Gimp.get_pdb().lookup_procedure('plug-in-curve-bend')
config = procedure.create_config()
config.set_property('run-mode', Gimp.RunMode.NONINTERACTIVE)
config.set_property('image', image)
config.set_core_object_array('drawables', [the_layer])
config.set_property('rotation', 0.0)
config.set_property('smoothing', True)
config.set_property('antialias', True)
config.set_property('work-on-copy', False)
config.set_property('curve-type', "smooth")
# config.set_property('curve-border', ["upper", "lower"]) # ?
config.set_property('upper-point-x', [0, 0.14, 0.5, 0.84, 1])  # GimpDoubleArray ?
config.set_property('upper-point-y', [0.5, 0.38, 0.31, 0.38, 0.5])
config.set_property('lower-point-x', [0, 0.14, 0.5, 0.84, 1])
config.set_property('lower-point-y', [0.5, 0.38, 0.31, 0.38, 0.5])
config.set_property('upper-val-y', 256)
config.set_property('lower-val-y', 256)
result = procedure.run(config)
success = result.index(0)
bent_layer = result.index(1)

And I get this:

TypeError: could not convert [0, 0.14, 0.5, 0.84, 1] to type ‘GimpDoubleArray’ when setting property GimpProcedureConfig-plug-in-curve-bend.upper-point-x

So how to do this? Have tried to find an example, without success.
Please help.

Still nobody has an idea?

Dear devs: please don’t leave us (non-professional) coders alone with those riddles.

You’ve made this API and know what to do, so please let us know.

Thank you.

Just be patient. One day or two is completely normal for a public forum. People have lives outside of the internet too.

Anyway I looked a bit. It looks like this might be a problem for bindings. Maybe we’ll have to make a special function for bindings (same as gimp_procedure_config_set_core_object_array() and gimp_procedure_config_set_color_array).

Or much simpler, we should be able to create a gimp_double_array_new() which would hide the typing shenanigans.

Normally the simple way would be to make a Gimp.Array.new() then fill in your double values with Gimp.DoubleArray.set_values(a, [0, 0.14, 0.5, 0.84, 1], False). All of which works. But then when I try to set_property this GimpArray, we’d get a typing issue from Gimp.Array to Gimp.DoubleArray because the binding doesn’t really get it’s the same thing.

I don’t have time to look further at it right now, but so far it feels like this can only be done in C and it’s broken in the bindings. A report would be appreciated so that we don’t forget looking at it.

Yes, sure. Will do soon.