mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
python: Update suggestion for GimpCoreObjectArray parameters
Resolves #12973 Since the standard 'drawables' argument for procedures is now a GimpCoreObjectArray, the suggested syntax for setting it in a Python call was incorrect. This impacts other parameters as well, so we add a check for the argument type being Gimp.ParamCoreObjectArray and then provide the correct Python code to set them.
This commit is contained in:
@@ -176,6 +176,9 @@ def run(procedure, config, data):
|
||||
if arg.name == 'run-mode':
|
||||
# Special handling for run mode.
|
||||
cmd += "config.set_property('" + arg.name + "', Gimp.RunMode.INTERACTIVE); "
|
||||
elif type(arg) == Gimp.ParamCoreObjectArray:
|
||||
# Special handling for GimpCoreObjectArray parameters
|
||||
cmd += "config.set_core_object_array('" + arg.name + "', " + arg.name.replace('-', '_') + "); "
|
||||
else:
|
||||
cmd += "config.set_property('" + arg.name + "', " + arg.name.replace('-', '_') + "); "
|
||||
|
||||
|
Reference in New Issue
Block a user