How can we get return value from PDB Procedure in Python code in GIMP3?

Hi,
Here is instruction about the way of calling a PDB Procedure in Python code in GIMP3.

https://testing.developer.gimp.org/resource/writing-a-plug-in/tutorial-python/#calling-a-pdb-procedure-in-python

However, in the code example, the return value of “procedure.run” seems to be “PDBStatusType” (the process was successful or not) and it is not the return value of PDB Procedure itself.

Does anyone know how to get the return value from PDB Procedure itself?
Or does anyone know how to call plugins directly from Python code in GIMP3? Because I am trying to use plugins through PDB.

You can get it from result.index(1), which is the first returned value after the status. If the PDB call returns multiple values, you’d replace the 1 with 2, 3, etc.

1 Like

Thank you! I will try it later.

1 Like

Thank you very much. It works!