mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00: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:
parent
6076c4d4a6
commit
ca6ea27c3e
1 changed files with 3 additions and 0 deletions
|
@ -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('-', '_') + "); "
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue