Skip to content

Instantly share code, notes, and snippets.

@hnbdr
hnbdr / call_procedure.py
Last active May 20, 2025 12:28
call_procedure.py
# Beware, support for set_core_object_array and set_color_array is poorly tested.
def call_procedure(name, **kwargs):
procedure = Gimp.get_pdb().lookup_procedure(name)
if not procedure:
raise RuntimeError(f"Procedure '{name}' not found")
config = procedure.create_config()
for key, value in kwargs.items():
argument = procedure.find_argument(key)