From ca6ea27c3edaa05ef9e312a5ef01af64dd9b8ff8 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Sat, 22 Feb 2025 03:45:55 +0000 Subject: [PATCH] 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. --- plug-ins/python/python-console/python-console.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plug-ins/python/python-console/python-console.py b/plug-ins/python/python-console/python-console.py index 60c850f0c5..c9ba63f210 100755 --- a/plug-ins/python/python-console/python-console.py +++ b/plug-ins/python/python-console/python-console.py @@ -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('-', '_') + "); "