Gimp.Procedure

g GObject.Object GObject.Object Gimp.Procedure Gimp.Procedure GObject.Object->Gimp.Procedure

Subclasses:

Gimp.BatchProcedure, Gimp.FileProcedure, Gimp.ImageProcedure, Gimp.ThumbnailProcedure

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (plug_in, name, proc_type, run_func, *run_data)

add_boolean_argument (name, nick, blurb, value, flags)

add_boolean_aux_argument (name, nick, blurb, value, flags)

add_boolean_return_value (name, nick, blurb, value, flags)

add_brush_argument (name, nick, blurb, none_ok, default_value, default_to_context, flags)

add_brush_aux_argument (name, nick, blurb, default_value, default_to_context, flags)

add_brush_return_value (name, nick, blurb, flags)

add_bytes_argument (name, nick, blurb, flags)

add_bytes_aux_argument (name, nick, blurb, flags)

add_bytes_return_value (name, nick, blurb, flags)

add_channel_argument (name, nick, blurb, none_ok, flags)

add_channel_aux_argument (name, nick, blurb, none_ok, flags)

add_channel_return_value (name, nick, blurb, none_ok, flags)

add_choice_argument (name, nick, blurb, choice, value, flags)

add_choice_aux_argument (name, nick, blurb, choice, value, flags)

add_choice_return_value (name, nick, blurb, choice, value, flags)

add_color_argument (name, nick, blurb, has_alpha, value, flags)

add_color_aux_argument (name, nick, blurb, has_alpha, value, flags)

add_color_from_string_argument (name, nick, blurb, has_alpha, value, flags)

add_color_from_string_aux_argument (name, nick, blurb, has_alpha, value, flags)

add_color_from_string_return_value (name, nick, blurb, has_alpha, value, flags)

add_color_return_value (name, nick, blurb, has_alpha, value, flags)

add_core_object_array_argument (name, nick, blurb, object_type, flags)

add_core_object_array_aux_argument (name, nick, blurb, object_type, flags)

add_core_object_array_return_value (name, nick, blurb, object_type, flags)

add_display_argument (name, nick, blurb, none_ok, flags)

add_display_aux_argument (name, nick, blurb, none_ok, flags)

add_display_return_value (name, nick, blurb, none_ok, flags)

add_double_argument (name, nick, blurb, min, max, value, flags)

add_double_array_argument (name, nick, blurb, flags)

add_double_array_aux_argument (name, nick, blurb, flags)

add_double_array_return_value (name, nick, blurb, flags)

add_double_aux_argument (name, nick, blurb, min, max, value, flags)

add_double_return_value (name, nick, blurb, min, max, value, flags)

add_drawable_argument (name, nick, blurb, none_ok, flags)

add_drawable_aux_argument (name, nick, blurb, none_ok, flags)

add_drawable_return_value (name, nick, blurb, none_ok, flags)

add_enum_argument (name, nick, blurb, enum_type, value, flags)

add_enum_aux_argument (name, nick, blurb, enum_type, value, flags)

add_enum_return_value (name, nick, blurb, enum_type, value, flags)

add_file_argument (name, nick, blurb, action, none_ok, default_file, flags)

add_file_aux_argument (name, nick, blurb, action, none_ok, default_file, flags)

add_file_return_value (name, nick, blurb, flags)

add_font_argument (name, nick, blurb, none_ok, default_value, default_to_context, flags)

add_font_aux_argument (name, nick, blurb, default_value, default_to_context, flags)

add_font_return_value (name, nick, blurb, flags)

add_gradient_argument (name, nick, blurb, none_ok, default_value, default_to_context, flags)

add_gradient_aux_argument (name, nick, blurb, default_value, default_to_context, flags)

add_gradient_return_value (name, nick, blurb, flags)

add_group_layer_argument (name, nick, blurb, none_ok, flags)

add_group_layer_aux_argument (name, nick, blurb, none_ok, flags)

add_group_layer_return_value (name, nick, blurb, none_ok, flags)

add_image_argument (name, nick, blurb, none_ok, flags)

add_image_aux_argument (name, nick, blurb, none_ok, flags)

add_image_return_value (name, nick, blurb, none_ok, flags)

add_int32_array_argument (name, nick, blurb, flags)

add_int32_array_aux_argument (name, nick, blurb, flags)

add_int32_array_return_value (name, nick, blurb, flags)

add_int_argument (name, nick, blurb, min, max, value, flags)

add_int_aux_argument (name, nick, blurb, min, max, value, flags)

add_int_return_value (name, nick, blurb, min, max, value, flags)

add_item_argument (name, nick, blurb, none_ok, flags)

add_item_aux_argument (name, nick, blurb, none_ok, flags)

add_item_return_value (name, nick, blurb, none_ok, flags)

add_layer_argument (name, nick, blurb, none_ok, flags)

add_layer_aux_argument (name, nick, blurb, none_ok, flags)

add_layer_mask_argument (name, nick, blurb, none_ok, flags)

add_layer_mask_aux_argument (name, nick, blurb, none_ok, flags)

add_layer_mask_return_value (name, nick, blurb, none_ok, flags)

add_layer_return_value (name, nick, blurb, none_ok, flags)

add_menu_path (menu_path)

add_palette_argument (name, nick, blurb, none_ok, default_value, default_to_context, flags)

add_palette_aux_argument (name, nick, blurb, default_value, default_to_context, flags)

add_palette_return_value (name, nick, blurb, flags)

add_param_argument (name, nick, blurb, param_type, flags)

add_param_aux_argument (name, nick, blurb, param_type, flags)

add_param_return_value (name, nick, blurb, param_type, flags)

add_parasite_argument (name, nick, blurb, flags)

add_parasite_aux_argument (name, nick, blurb, flags)

add_parasite_return_value (name, nick, blurb, flags)

add_path_argument (name, nick, blurb, none_ok, flags)

add_path_aux_argument (name, nick, blurb, none_ok, flags)

add_path_return_value (name, nick, blurb, none_ok, flags)

add_pattern_argument (name, nick, blurb, none_ok, default_value, default_to_context, flags)

add_pattern_aux_argument (name, nick, blurb, default_value, default_to_context, flags)

add_pattern_return_value (name, nick, blurb, flags)

add_resource_argument (name, nick, blurb, none_ok, default_value, flags)

add_resource_aux_argument (name, nick, blurb, default_value, flags)

add_resource_return_value (name, nick, blurb, flags)

add_selection_argument (name, nick, blurb, none_ok, flags)

add_selection_aux_argument (name, nick, blurb, none_ok, flags)

add_selection_return_value (name, nick, blurb, none_ok, flags)

add_string_argument (name, nick, blurb, value, flags)

add_string_array_argument (name, nick, blurb, flags)

add_string_array_aux_argument (name, nick, blurb, flags)

add_string_array_return_value (name, nick, blurb, flags)

add_string_aux_argument (name, nick, blurb, value, flags)

add_string_return_value (name, nick, blurb, value, flags)

add_text_layer_argument (name, nick, blurb, none_ok, flags)

add_text_layer_aux_argument (name, nick, blurb, none_ok, flags)

add_text_layer_return_value (name, nick, blurb, none_ok, flags)

add_uint_argument (name, nick, blurb, min, max, value, flags)

add_uint_aux_argument (name, nick, blurb, min, max, value, flags)

add_uint_return_value (name, nick, blurb, min, max, value, flags)

add_unit_argument (name, nick, blurb, show_pixels, show_percent, value, flags)

add_unit_aux_argument (name, nick, blurb, show_pixels, show_percent, value, flags)

add_unit_return_value (name, nick, blurb, show_pixels, show_percent, value, flags)

create_config ()

find_argument (name)

find_aux_argument (name)

find_return_value (name)

get_argument_sync (arg_name)

get_arguments ()

get_authors ()

get_aux_arguments ()

get_blurb ()

get_copyright ()

get_date ()

get_help ()

get_help_id ()

get_icon_file ()

get_icon_name ()

get_icon_pixbuf ()

get_icon_type ()

get_image_types ()

get_menu_label ()

get_menu_paths ()

get_name ()

get_plug_in ()

get_proc_type ()

get_return_values ()

get_sensitivity_mask ()

is_internal ()

new_return_values (status, error)

persistent_ready ()

run (config)

set_argument_sync (arg_name, sync)

set_attribution (authors, copyright, date)

set_documentation (blurb, help, help_id)

set_icon_file (file)

set_icon_name (icon_name)

set_icon_pixbuf (pixbuf)

set_image_types (image_types)

set_menu_label (menu_label)

set_sensitivity_mask (sensitivity_mask)

Virtual Methods

Inherited:

GObject.Object (7)

do_install ()

do_run (args)

do_set_sensitivity (sensitivity_mask)

do_uninstall ()

Properties

Name

Type

Flags

Short Description

name

str

r/w/co

The procedure’s name

plug-in

Gimp.PlugIn

r/w/co

The Gimp.PlugIn of this plug-in process

procedure-type

Gimp.PDBProcType

r/w/co

The procedure’s type

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Gimp.Procedure(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Gimp.ProcedureClass

Procedures are registered functions which can be run across GIMP ecosystem. They can be created by plug-ins and can then run by the core application when called from menus (or through other interaction depending on specific procedure subclasses).

A plug-in can also run procedures created by the core, but also the ones created by other plug-ins (see [classPDB]).

classmethod new(plug_in, name, proc_type, run_func, *run_data)
Parameters:
Returns:

a new Gimp.Procedure.

Return type:

Gimp.Procedure

Creates a new procedure named name which will call run_func when invoked.

The name parameter is mandatory and should be unique, or it will overwrite an already existing procedure (overwrite procedures only if you know what you’re doing).

proc_type should be [enum`Gimp`.PDBProcType.PLUGIN] for “normal” plug-ins.

Using [enum`Gimp`.PDBProcType.PERSISTENT] means that the plug-in will add temporary procedures. Therefore, the GIMP core will wait until the Gimp.PDBProcType.PERSISTENT procedure has called [method`Procedure`.persistent_ready], which means that the procedure has done its initialization, installed its temporary procedures and is ready to run.

*Not calling [method`Procedure`.persistent_ready] from a Gimp.PDBProcType.PERSISTENT procedure will cause the GIMP core to lock up.*

Additionally, a Gimp.PDBProcType.PERSISTENT procedure with no arguments added is an “automatic” extension that will be automatically started on each GIMP startup.

[enum`Gimp`.PDBProcType.TEMPORARY] must be used for temporary procedures that are created during a plug-ins lifetime. They must be added to the Gimp.PlugIn using [method`PlugIn`.add_temp_procedure].

run_func is called via [method`Procedure`.run].

For Gimp.PDBProcType.PLUGIN and Gimp.PDBProcType.PERSISTENT procedures the call of run_func is basically the lifetime of the plug-in.

New in version 3.0.

add_boolean_argument(name, nick, blurb, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • value (bool) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new boolean argument to self.

New in version 3.0.

add_boolean_aux_argument(name, nick, blurb, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • value (bool) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new boolean auxiliary argument to self.

New in version 3.0.

add_boolean_return_value(name, nick, blurb, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • value (bool) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new boolean return value to self.

New in version 3.0.

add_brush_argument(name, nick, blurb, none_ok, default_value, default_to_context, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – whether None is a valid value.

  • default_value (Gimp.Brush or None) – default value

  • default_to_context (bool) – Use the context’s brush as default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Brush argument to self.

New in version 3.0.

add_brush_aux_argument(name, nick, blurb, default_value, default_to_context, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • default_value (Gimp.Brush or None) – default value

  • default_to_context (bool) – Use the context’s brush as default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Brush auxiliary argument to self.

New in version 3.0.

add_brush_return_value(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Brush return value to self.

New in version 3.0.

add_bytes_argument(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new GLib.Bytes argument to self.

New in version 3.0.

add_bytes_aux_argument(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new GLib.Bytes auxiliary argument to self.

New in version 3.0.

add_bytes_return_value(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new GLib.Bytes return value to self.

New in version 3.0.

add_channel_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Channel argument to self.

New in version 3.0.

add_channel_aux_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Channel auxiliary argument to self.

New in version 3.0.

add_channel_return_value(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Channel return value to self.

New in version 3.0.

add_choice_argument(name, nick, blurb, choice, value, flags)
Parameters:

Add a new Gimp.Choice argument to self.

New in version 3.0.

add_choice_aux_argument(name, nick, blurb, choice, value, flags)
Parameters:

Add a new Gimp.Choice auxiliary argument to self.

New in version 3.0.

add_choice_return_value(name, nick, blurb, choice, value, flags)
Parameters:

Add a new Gimp.Choice return value to self.

New in version 3.0.

add_color_argument(name, nick, blurb, has_alpha, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • has_alpha (bool) – whether the argument has transparency.

  • value (Gegl.Color) – the default Gegl.Color value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gegl.Color argument to self.

New in version 3.0.

add_color_aux_argument(name, nick, blurb, has_alpha, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • has_alpha (bool) – whether the argument has transparency.

  • value (Gegl.Color) – the default Gegl.Color value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gegl.Color auxiliary argument to self.

New in version 3.0.

add_color_from_string_argument(name, nick, blurb, has_alpha, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • has_alpha (bool) – whether the argument has transparency.

  • value (str) – the default Gegl.Color value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gegl.Color argument to self from a string representation.

New in version 3.0.

add_color_from_string_aux_argument(name, nick, blurb, has_alpha, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • has_alpha (bool) – whether the argument has transparency.

  • value (str) – the default Gegl.Color value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gegl.Color auxiliary argument to self from a string representation.

New in version 3.0.

add_color_from_string_return_value(name, nick, blurb, has_alpha, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • has_alpha (bool) – whether the argument has transparency.

  • value (str) – the default Gegl.Color value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gegl.Color return value to self from a string representation.

New in version 3.0.

add_color_return_value(name, nick, blurb, has_alpha, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • has_alpha (bool) – whether the argument has transparency.

  • value (Gegl.Color) – the default Gegl.Color value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gegl.Color return value to self.

New in version 3.0.

add_core_object_array_argument(name, nick, blurb, object_type, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description. object_type the type of object stored in the array

  • object_type (GObject.GType) –

  • flags (GObject.ParamFlags) – argument flags.

Add a new object array argument to self.

New in version 3.0.

add_core_object_array_aux_argument(name, nick, blurb, object_type, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description. object_type the type of object stored in the array

  • object_type (GObject.GType) –

  • flags (GObject.ParamFlags) – argument flags.

Add a new object array auxiliary argument to self.

New in version 3.0.

add_core_object_array_return_value(name, nick, blurb, object_type, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description. object_type the type of object stored in the array

  • object_type (GObject.GType) –

  • flags (GObject.ParamFlags) – argument flags.

Add a new object array return value to self.

New in version 3.0.

add_display_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Display argument to self.

New in version 3.0.

add_display_aux_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Display auxiliary argument to self.

New in version 3.0.

add_display_return_value(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Display return value to self.

New in version 3.0.

add_double_argument(name, nick, blurb, min, max, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • min (float) – the minimum value for this argument

  • max (float) – the maximum value for this argument

  • value (float) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new floating-point in double precision argument to self.

New in version 3.0.

add_double_array_argument(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new double array argument to self.

New in version 3.0.

add_double_array_aux_argument(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new double array auxiliary argument to self.

New in version 3.0.

add_double_array_return_value(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new double array return value to self.

New in version 3.0.

add_double_aux_argument(name, nick, blurb, min, max, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • min (float) – the minimum value for this argument

  • max (float) – the maximum value for this argument

  • value (float) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new floating-point in double precision auxiliary argument to self.

New in version 3.0.

add_double_return_value(name, nick, blurb, min, max, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • min (float) – the minimum value for this argument

  • max (float) – the maximum value for this argument

  • value (float) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new floating-point in double precision return value to self.

New in version 3.0.

add_drawable_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Drawable argument to self.

New in version 3.0.

add_drawable_aux_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Drawable auxiliary argument to self.

New in version 3.0.

add_drawable_return_value(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Drawable return value to self.

New in version 3.0.

add_enum_argument(name, nick, blurb, enum_type, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • enum_type (GObject.GType) – the GObject.GType for this argument

  • value (int) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new enum argument to self.

New in version 3.0.

add_enum_aux_argument(name, nick, blurb, enum_type, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • enum_type (GObject.GType) – the GObject.GType for this argument

  • value (int) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new enum auxiliary argument to self.

New in version 3.0.

add_enum_return_value(name, nick, blurb, enum_type, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • enum_type (GObject.GType) – the GObject.GType for this argument

  • value (int) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new enum return value to self.

New in version 3.0.

add_file_argument(name, nick, blurb, action, none_ok, default_file, flags)
Parameters:
  • name (str) – The name of the argument to be created.

  • nick (str) – The label used in #GimpProcedureDialog.

  • blurb (str or None) – A more detailed help description.

  • action (Gimp.FileChooserAction) – The type of file to expect.

  • none_ok (bool) – Whether None is allowed.

  • default_file (Gio.File or None) – File to use if none is assigned.

  • flags (GObject.ParamFlags) – Argument flags.

Add a new Gio.File argument to self.

New in version 3.0.

add_file_aux_argument(name, nick, blurb, action, none_ok, default_file, flags)
Parameters:
  • name (str) – The name of the argument to be created.

  • nick (str) – The label used in #GimpProcedureDialog.

  • blurb (str or None) – A more detailed help description.

  • action (Gimp.FileChooserAction) – The type of file to expect.

  • none_ok (bool) – Whether None is allowed.

  • default_file (Gio.File or None) – File to use if none is assigned.

  • flags (GObject.ParamFlags) – Argument flags.

Add a new Gio.File auxiliary argument to self.

New in version 3.0.

add_file_return_value(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gio.File return value to self.

New in version 3.0.

add_font_argument(name, nick, blurb, none_ok, default_value, default_to_context, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – whether None is a valid value.

  • default_value (Gimp.Font or None) – default value

  • default_to_context (bool) – Use the context’s font as default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Font argument to self.

New in version 3.0.

add_font_aux_argument(name, nick, blurb, default_value, default_to_context, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • default_value (Gimp.Font or None) – default value

  • default_to_context (bool) – Use the context’s font as default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Font auxiliary argument to self.

New in version 3.0.

add_font_return_value(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Font return value to self.

New in version 3.0.

add_gradient_argument(name, nick, blurb, none_ok, default_value, default_to_context, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – whether None is a valid value.

  • default_value (Gimp.Gradient or None) – default value

  • default_to_context (bool) – Use the context’s gradient as default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Gradient argument to self.

New in version 3.0.

add_gradient_aux_argument(name, nick, blurb, default_value, default_to_context, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • default_value (Gimp.Gradient or None) – default value

  • default_to_context (bool) – Use the context’s gradient as default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Gradient auxiliary argument to self.

New in version 3.0.

add_gradient_return_value(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Gradient return value to self.

New in version 3.0.

add_group_layer_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new [class`GroupLayer`] argument to self.

New in version 3.0.

add_group_layer_aux_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new [class`GroupLayer`] auxiliary argument to self.

New in version 3.0.

add_group_layer_return_value(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new [class`GroupLayer`] return value to self.

New in version 3.0.

add_image_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Image argument to self.

New in version 3.0.

add_image_aux_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Image auxiliary argument to self.

New in version 3.0.

add_image_return_value(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Image return value to self.

New in version 3.0.

add_int32_array_argument(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new integer array argument to self.

New in version 3.0.

add_int32_array_aux_argument(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new integer array auxiliary argument to self.

New in version 3.0.

add_int32_array_return_value(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new integer array return value to self.

New in version 3.0.

add_int_argument(name, nick, blurb, min, max, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • min (int) – the minimum value for this argument

  • max (int) – the maximum value for this argument

  • value (int) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new integer argument to self.

New in version 3.0.

add_int_aux_argument(name, nick, blurb, min, max, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • min (int) – the minimum value for this argument

  • max (int) – the maximum value for this argument

  • value (int) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new integer auxiliary argument to self.

New in version 3.0.

add_int_return_value(name, nick, blurb, min, max, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • min (int) – the minimum value for this argument

  • max (int) – the maximum value for this argument

  • value (int) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new integer return value to self.

New in version 3.0.

add_item_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Item argument to self.

New in version 3.0.

add_item_aux_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Item auxiliary argument to self.

New in version 3.0.

add_item_return_value(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Item return value to self.

New in version 3.0.

add_layer_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Layer argument to self.

New in version 3.0.

add_layer_aux_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Layer auxiliary argument to self.

New in version 3.0.

add_layer_mask_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.LayerMask argument to self.

New in version 3.0.

add_layer_mask_aux_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.LayerMask auxiliary argument to self.

New in version 3.0.

add_layer_mask_return_value(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.LayerMask return value to self.

New in version 3.0.

add_layer_return_value(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Layer return value to self.

New in version 3.0.

add_menu_path(menu_path)
Parameters:

menu_path (str) – The self's additional menu path.

Adds a menu path to the procedure. Only procedures which have a menu label can add a menu path.

Menu paths are untranslated paths to known menus and submenus with the syntax <Prefix>/Path/To/Submenu, for example <Image>/Layer/Transform. GIMP will localize these. Nevertheless you should localize unknown parts of the path. For instance, say you want to create procedure to create customized layers and add a Create submenu which you want to localize from your plug-in with gettext. You could call:

``C path = g_build_path (“/”, “<Image>/Layer”, _(“Create”), NULL); gimp_procedure_add_menu_path (procedure, path); g_free (path); ``

See also: Gimp.PlugIn.add_menu_branch().

GIMP menus also have a concept of named section. For instance, say you are creating a plug-in which you want to show next to the “Export”, “Export As” plug-ins in the File menu. You would add it to the menu path “File/[Export]”. If you actually wanted to create a submenu called “[Export]” (with square brackets), double the brackets: “File/[[Export]]”

See also: https://gitlab.gnome.org/GNOME/gimp/-/blob/master/menus/image-menu.ui.in.in

This function will place your procedure to the bottom of the selected path or section. Order is not assured relatively to other plug-ins.

New in version 3.0.

add_palette_argument(name, nick, blurb, none_ok, default_value, default_to_context, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – whether None is a valid value.

  • default_value (Gimp.Palette or None) – default value

  • default_to_context (bool) – Use the context’s palette as default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Palette argument to self.

New in version 3.0.

add_palette_aux_argument(name, nick, blurb, default_value, default_to_context, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • default_value (Gimp.Palette or None) – default value

  • default_to_context (bool) – Use the context’s palette as default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Palette auxiliary argument to self.

New in version 3.0.

add_palette_return_value(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Palette return value to self.

New in version 3.0.

add_param_argument(name, nick, blurb, param_type, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • param_type (GObject.GType) – the #GPParamType for this argument

  • flags (GObject.ParamFlags) – argument flags.

Add a new param argument to self.

New in version 3.0.

add_param_aux_argument(name, nick, blurb, param_type, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • param_type (GObject.GType) – the #GPParamType for this argument

  • flags (GObject.ParamFlags) – argument flags.

Add a new param auxiliary argument to self.

New in version 3.0.

add_param_return_value(name, nick, blurb, param_type, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • param_type (GObject.GType) – the #GPParamType for this argument

  • flags (GObject.ParamFlags) – argument flags.

Add a new param return value to self.

New in version 3.0.

add_parasite_argument(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Parasite argument to self.

New in version 3.0.

add_parasite_aux_argument(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Parasite auxiliary argument to self.

New in version 3.0.

add_parasite_return_value(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Parasite return value to self.

New in version 3.0.

add_path_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Path argument to self.

New in version 3.0.

add_path_aux_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Path auxiliary argument to self.

New in version 3.0.

add_path_return_value(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Path return value to self.

New in version 3.0.

add_pattern_argument(name, nick, blurb, none_ok, default_value, default_to_context, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – whether None is a valid value.

  • default_value (Gimp.Pattern or None) – default value

  • default_to_context (bool) – Use the context’s pattern as default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Pattern argument to self.

New in version 3.0.

add_pattern_aux_argument(name, nick, blurb, default_value, default_to_context, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • default_value (Gimp.Pattern or None) – default value

  • default_to_context (bool) – Use the context’s pattern as default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Pattern auxiliary argument to self.

New in version 3.0.

add_pattern_return_value(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Pattern return value to self.

New in version 3.0.

add_resource_argument(name, nick, blurb, none_ok, default_value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – whether None is a valid value.

  • default_value (Gimp.Resource or None) – default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Resource argument to self.

New in version 3.0.

add_resource_aux_argument(name, nick, blurb, default_value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • default_value (Gimp.Resource or None) – default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Resource auxiliary argument to self.

New in version 3.0.

add_resource_return_value(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Resource return value to self.

New in version 3.0.

add_selection_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Selection argument to self.

New in version 3.0.

add_selection_aux_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Selection auxiliary argument to self.

New in version 3.0.

add_selection_return_value(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Selection return value to self.

New in version 3.0.

add_string_argument(name, nick, blurb, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • value (str) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new string argument to self.

New in version 3.0.

add_string_array_argument(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new string array argument to self.

New in version 3.0.

add_string_array_aux_argument(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new string array auxiliary argument to self.

New in version 3.0.

add_string_array_return_value(name, nick, blurb, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • flags (GObject.ParamFlags) – argument flags.

Add a new string array return value to self.

New in version 3.0.

add_string_aux_argument(name, nick, blurb, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • value (str) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new string auxiliary argument to self.

New in version 3.0.

add_string_return_value(name, nick, blurb, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • value (str) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new string return value to self.

New in version 3.0.

add_text_layer_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.TextLayer argument to self.

New in version 3.0.

add_text_layer_aux_argument(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.TextLayer auxiliary argument to self.

New in version 3.0.

add_text_layer_return_value(name, nick, blurb, none_ok, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • none_ok (bool) – Whether no is a valid value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.TextLayer return value to self.

New in version 3.0.

add_uint_argument(name, nick, blurb, min, max, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • min (int) – the minimum value for this argument

  • max (int) – the maximum value for this argument

  • value (int) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new unsigned integer argument to self.

New in version 3.0.

add_uint_aux_argument(name, nick, blurb, min, max, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • min (int) – the minimum value for this argument

  • max (int) – the maximum value for this argument

  • value (int) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new unsigned integer auxiliary argument to self.

New in version 3.0.

add_uint_return_value(name, nick, blurb, min, max, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • min (int) – the minimum value for this argument

  • max (int) – the maximum value for this argument

  • value (int) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new unsigned integer return value to self.

New in version 3.0.

add_unit_argument(name, nick, blurb, show_pixels, show_percent, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • show_pixels (bool) – whether to allow pixels as a valid option

  • show_percent (bool) – whether to allow percent as a valid option

  • value (Gimp.Unit) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Unit argument to self.

New in version 3.0.

add_unit_aux_argument(name, nick, blurb, show_pixels, show_percent, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • show_pixels (bool) – whether to allow pixels as a valid option

  • show_percent (bool) – whether to allow percent as a valid option

  • value (Gimp.Unit) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Unit auxiliary argument to self.

New in version 3.0.

add_unit_return_value(name, nick, blurb, show_pixels, show_percent, value, flags)
Parameters:
  • name (str) – the name of the argument to be created.

  • nick (str) – the label used in #GimpProcedureDialog.

  • blurb (str or None) – a more detailed help description.

  • show_pixels (bool) – whether to allow pixels as a valid option

  • show_percent (bool) – whether to allow percent as a valid option

  • value (Gimp.Unit) – the default value.

  • flags (GObject.ParamFlags) – argument flags.

Add a new Gimp.Unit return value to self.

New in version 3.0.

create_config()
Returns:

The new Gimp.Config.

Return type:

Gimp.ProcedureConfig

Create a Gimp.Config with properties that match self's arguments, to be used in [method`Procedure`.run_config] method.

New in version 3.0.

find_argument(name)
Parameters:

name (str) – An argument name

Returns:

The self's argument with name if it exists, or None otherwise.

Return type:

GObject.ParamSpec

Searches the self's arguments for a GObject.ParamSpec called name.

New in version 3.0.

find_aux_argument(name)
Parameters:

name (str) – An auxiliary argument name

Returns:

The self's auxiliary argument with name if it exists, or None otherwise.

Return type:

GObject.ParamSpec

Searches the self's auxiliary arguments for a GObject.ParamSpec called name.

New in version 3.0.

find_return_value(name)
Parameters:

name (str) – A return value name

Returns:

The self's return values with name if it exists, or None otherwise.

Return type:

GObject.ParamSpec

Searches the self's return values for a GObject.ParamSpec called name.

New in version 3.0.

get_argument_sync(arg_name)
Parameters:

arg_name (str) – the name of one of self's arguments or auxiliary arguments

Returns:

The Gimp.ArgumentSync value set with Gimp.Procedure.set_argument_sync():

Return type:

Gimp.ArgumentSync

New in version 3.0.

get_arguments()
Returns:

An array of GParamSpec in the order they were added in.

Return type:

[GObject.ParamSpec]

New in version 3.0.

get_authors()
Returns:

The procedure’s authors given in [method`Procedure`.set_attribution].

Return type:

str

New in version 3.0.

get_aux_arguments()
Returns:

An array of GParamSpec in the order they were added in.

Return type:

[GObject.ParamSpec]

New in version 3.0.

get_blurb()
Returns:

The procedure’s blurb given in [method`Procedure`.set_documentation].

Return type:

str

New in version 3.0.

Returns:

The procedure’s copyright given in [method`Procedure`.set_attribution].

Return type:

str

New in version 3.0.

get_date()
Returns:

The procedure’s date given in [method`Procedure`.set_attribution].

Return type:

str

New in version 3.0.

get_help()
Returns:

The procedure’s help text given in [method`Procedure`.set_documentation].

Return type:

str

New in version 3.0.

get_help_id()
Returns:

The procedure’s help ID given in [method`Procedure`.set_documentation].

Return type:

str

New in version 3.0.

get_icon_file()
Returns:

the icon Gio.File or None if no file was set.

Return type:

Gio.File or None

Gets the file of the icon if one was set for self.

New in version 3.0.

get_icon_name()
Returns:

the icon name or None if no icon name was set.

Return type:

str or None

Gets the name of the icon if one was set for self.

New in version 3.0.

get_icon_pixbuf()
Returns:

the icon pixbuf or None if no icon name was set.

Return type:

GdkPixbuf.Pixbuf or None

Gets the GdkPixbuf.Pixbuf of the icon if an icon was set this way for self.

New in version 3.0.

get_icon_type()
Returns:

the Gimp.IconType of self's icon.

Return type:

Gimp.IconType

Gets the type of data set as self's icon. Depending on the result, you can call the relevant specific function, such as [method`Procedure`.get_icon_name].

New in version 3.0.

get_image_types()
Returns:

The image types.

Return type:

str

This function retrieves the list of image types the procedure can operate on. See Gimp.Procedure.set_image_types().

New in version 3.0.

get_menu_label()
Returns:

The procedure’s menu label given in Gimp.Procedure.set_menu_label().

Return type:

str

New in version 3.0.

get_menu_paths()
Returns:

the self's menu paths as added with Gimp.Procedure.add_menu_path().

Return type:

[str]

New in version 3.0.

get_name()
Returns:

The procedure’s name given in [ctor`Procedure`.new].

Return type:

str

New in version 3.0.

get_plug_in()
Returns:

The Gimp.PlugIn given in [ctor`Procedure`.new].

Return type:

Gimp.PlugIn

New in version 3.0.

get_proc_type()
Returns:

The procedure’s type given in [ctor`Procedure`.new].

Return type:

Gimp.PDBProcType

New in version 3.0.

get_return_values()
Returns:

An array of GParamSpec in the order they were added in.

Return type:

[GObject.ParamSpec]

New in version 3.0.

get_sensitivity_mask()
Returns:

The procedure’s sensitivity mask given in [method`Procedure`.set_sensitivity_mask].

Return type:

int

New in version 3.0.

is_internal()
Returns:

Whether self is an internal procedure or not.

Return type:

bool

Provide the information if self is an internal procedure. Only a procedure looked up in the [class`Gimp`.PDB] can be internal. Procedures created by a plug-in in particular are never internal.

New in version 3.0.

new_return_values(status, error)
Parameters:
Returns:

the expected Gimp.ValueArray as could be returned by a [callback`RunFunc`].

Return type:

Gimp.ValueArray

Format the expected return values from procedures.

New in version 3.0.

persistent_ready()

Notify the main GIMP application that the persistent procedure has been properly initialized and is ready to run.

This function _must_ be called from every procedure’s [callback`RunFunc`] that was created as [enum`Gimp`.PDBProcType.PERSISTENT].

Subsequently, extensions can process temporary procedure run requests using either [method`PlugIn`.persistent_enable] or [method`PlugIn`.persistent_process].

See also: [ctor`Procedure`.new].

New in version 3.0.

run(config)
Parameters:

config (Gimp.ProcedureConfig or None) – the self's arguments.

Returns:

The self's return values.

Return type:

Gimp.ValueArray

Runs self, calling the run_func given in [ctor`Procedure`.new].

Create config at default values with [method`Gimp`.Procedure.create_config] then set any argument you wish to change from defaults with [method`GObject`.Object.set].

If config is None, the default arguments of self will be used.

New in version 3.0.

set_argument_sync(arg_name, sync)
Parameters:
  • arg_name (str) – the name of one of self's arguments or auxiliary arguments.

  • sync (Gimp.ArgumentSync) – how to sync the argument or auxiliary argument.

When the procedure’s run() function exits, a Gimp.Procedure's arguments or auxiliary arguments can be automatically synced with a Gimp.Parasite of the Gimp.Image the procedure is running on.

In order to enable this, set sync to Gimp.ArgumentSync.PARASITE.

Currently, it is possible to sync a string argument of type GObject.ParamSpecString with an image parasite of the same name, for example the “gimp-comment” parasite in file save procedures.

New in version 3.0.

set_attribution(authors, copyright, date)
Parameters:
  • authors (str) – The self's author(s).

  • copyright (str) – The self's copyright.

  • date (str) – The self's date (written or published).

Sets various attribution strings on self.

New in version 3.0.

set_documentation(blurb, help, help_id)
Parameters:
  • blurb (str) – The self's blurb.

  • help (str or None) – The self's help text.

  • help_id (str or None) – The self's help ID.

Sets various documentation strings on self:

  • blurb is used for instance as the self's tooltip when represented in the UI such as a menu entry.

  • help is a free-form text that’s meant as additional documentation for developers of scripts and plug-ins. If the blurb and the argument names and descriptions are enough for a quite self-explanatory procedure, you may set help to None, rather than setting an uninformative help (avoid setting the same text as blurb or redundant information).

Plug-ins are responsible for their own translations. You are expected to send localized strings of blurb and help to GIMP if your plug-in is internationalized.

New in version 3.0.

set_icon_file(file)
Parameters:

file (Gio.File or None) – a Gio.File pointing to an image file.

Sets the icon for self to the contents of an image file.

New in version 3.0.

set_icon_name(icon_name)
Parameters:

icon_name (str or None) – an icon name.

Sets the icon for self to the icon referenced by icon_name.

New in version 3.0.

set_icon_pixbuf(pixbuf)
Parameters:

pixbuf (GdkPixbuf.Pixbuf or None) – a GdkPixbuf.Pixbuf.

Sets the icon for self to pixbuf.

New in version 3.0.

set_image_types(image_types)
Parameters:

image_types (str) – The image types this procedure can operate on.

This is a comma separated list of image types, or actually drawable types, that this procedure can deal with. Wildcards are possible here, so you could say “RGB\*” instead of “RGB, RGBA” or “\*” for all image types.

Supported types are “RGB”, “GRAY”, “INDEXED” and their variants with alpha.

New in version 3.0.

set_menu_label(menu_label)
Parameters:

menu_label (str) – The self's menu label.

Sets the label to use for the self's menu entry, The location(s) where to register in the menu hierarchy is chosen using Gimp.Procedure.add_menu_path().

Plug-ins are responsible for their own translations. You are expected to send localized strings to GIMP if your plug-in is internationalized.

New in version 3.0.

set_sensitivity_mask(sensitivity_mask)
Parameters:

sensitivity_mask (int) – A binary mask of [flags`Gimp`.ProcedureSensitivityMask].

Sets the cases when self is supposed to be sensitive or not.

Note that it will be used by the core to determine whether to show a procedure as sensitive (hence forbid running it otherwise), yet it will not forbid thid-party plug-ins for instance to run manually your registered procedure. Therefore you should still handle non-supported cases appropriately by returning with Gimp.PDBStatusType.EXECUTION_ERROR and a suitable error message.

Similarly third-party plug-ins should verify they are allowed to call a procedure with [method`Procedure`.get_sensitivity_mask] when running with dynamic contents.

Note that by default, a procedure works on an image with one or more drawables selected. Hence not setting the mask, setting it with 0 or setting it with GIMP_PROCEDURE_SENSITIVE_DRAWABLE | GIMP_PROCEDURE_SENSITIVE_DRAWABLES are equivalent.

New in version 3.0.

do_install() virtual

called to install the procedure with the main GIMP application. This is an implementation detail and must never be called by any plug-in code.

do_run(args) virtual
Parameters:

args (Gimp.ValueArray) –

Return type:

Gimp.ValueArray

called when the procedure is executed via Gimp.Procedure.run(). the default implementation simply calls the procedure’s Gimp.RunFunc, Gimp.Procedure subclasses are free to modify the passed args and call their own, subclass-specific run functions.

do_set_sensitivity(sensitivity_mask) virtual
Parameters:

sensitivity_mask (int) –

Return type:

bool

do_uninstall() virtual

called to uninstall the procedure from the main GIMP application. This is an implementation detail and must never be called by any plug-in code.

Property Details

Gimp.Procedure.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The procedure’s name

Gimp.Procedure.props.plug_in
Name:

plug-in

Type:

Gimp.PlugIn

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The Gimp.PlugIn of this plug-in process

Gimp.Procedure.props.procedure_type
Name:

procedure-type

Type:

Gimp.PDBProcType

Default Value:

Gimp.PDBProcType.PLUGIN

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The procedure’s type