Gimp.ProcedureConfig

g GObject.Object GObject.Object Gimp.ProcedureConfig Gimp.ProcedureConfig GObject.Object->Gimp.ProcedureConfig

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_choice_id (property_name)

get_color_array (property_name)

get_core_object_array (property_name)

get_procedure ()

save_metadata (exported_image, file)

set_color_array (property_name, colors)

set_core_object_array (property_name, objects)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

procedure

Gimp.Procedure

r/w/co

The procedure this config object is used for

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Gimp.ProcedureConfig(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

Gimp.ProcedureConfigClass

The base class for [class`Procedure`] specific config objects and the main interface to manage aspects of [class`Procedure`]’s arguments such as persistency of the last used arguments across GIMP sessions.

A procedure config is created by a [class`Procedure`] using [method`Procedure`.create_config] and its properties match the procedure’s arguments and auxiliary arguments in number, order and type.

It implements the [struct`Config`] interface and therefore has all its serialization and deserialization features.

New in version 3.0.

get_choice_id(property_name)
Parameters:

property_name (str) – the name of a #GimpParamSpecChoice property.

Return type:

int

A utility function which will get the current string value of a #GimpParamSpecChoice property in self and convert it to the integer ID mapped to this value. This makes it easy to work with an Enum type locally, within a plug-in code.

New in version 3.0.

get_color_array(property_name)
Parameters:

property_name (str) – the name of a GObject.ParamSpecBoxed param spec with [type`ColorArray`] value type.

Returns:

an array of GObject.Objects.

Return type:

[Gegl.Color]

A function for bindings to get a [type`ColorArray`] property. Getting these with [method`GObject`.Object.get] or [method`GObject`.Object.get_property] won’t work for the time being so all our boxed array types must be set and get using these alternative functions instead.

C plug-ins should just use [method`GObject`.Object.get].

New in version 3.0.

get_core_object_array(property_name)
Parameters:

property_name (str) – the name of a #GimpParamSpecCoreObjectArray param spec.

Returns:

an array of GObject.Objects.

Return type:

[GObject.Object]

A function for bindings to get a [type`CoreObjectArray`] property. Getting these with [method`GObject`.Object.get] or [method`GObject`.Object.get_property] won’t work for the time being so all our boxed array types must be set and get using alternative functions instead.

C plug-ins should just use [method`GObject`.Object.get].

New in version 3.0.

get_procedure()
Returns:

The procedure which created this config.

Return type:

Gimp.Procedure

This function returns the [class`Procedure`] which created self, see [method`Procedure`.create_config].

New in version 3.0.

save_metadata(exported_image, file)
Parameters:
  • exported_image (Gimp.Image) – the image that was actually exported

  • file (Gio.File) – the file exported_image was written to

*Note: There is normally no need to call this function because it’s already called by [class`ExportProcedure`] after the run() callback.*

*Only use this function if the [class`Metadata`] passed as argument of a [class`ExportProcedure`]’s run() method needs to be written at a specific point of the export, other than its end.*

This function syncs back self's export properties to the metadata’s [flags`MetadataSaveFlags`] and writes the metadata to file.

The metadata is only ever written once. If this function has been called explicitly, it will do nothing when called a second time at the end of the run() callback.

New in version 3.0.

set_color_array(property_name, colors)
Parameters:

A function for bindings to set a [type`ColorArray`] property. Setting these with [method`GObject`.Object.set] or [method`GObject`.Object.set_property] won’t work for the time being so all our boxed array types must be set and get using these alternative functions instead.

C plug-ins should just use [method`GObject`.Object.set].

New in version 3.0.

set_core_object_array(property_name, objects)
Parameters:

A function for bindings to set a [type`CoreObjectArray`] property. Setting these with [method`GObject`.Object.set] or [method`GObject`.Object.set_property] won’t work for the time being so all our boxed array types must be set and get using alternative functions instead.

C plug-ins should just use [method`GObject`.Object.set].

New in version 3.0.

Property Details

Gimp.ProcedureConfig.props.procedure
Name:

procedure

Type:

Gimp.Procedure

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The procedure this config object is used for