Method
GimpProcedureConfigbegin_run
unstable since: 3.0
Declaration [src]
void
gimp_procedure_config_begin_run (
GimpProcedureConfig* config,
GimpImage* image,
GimpRunMode run_mode,
const GimpValueArray* args
)
Description [src]
Populates config
with values for a GimpProcedure
‘s run(),
depending on run_mode
.
If run_mode
is GIMP_RUN_INTERACTIVE
or GIMP_RUN_WITH_LAST_VALS
,
the saved values from the procedure’s last run()
are loaded and set
on config
. If image
is not NULL
, the last used values for this
image are tried first, and if no image-specific values are found
the globally saved last used values are used. If no saved last used
values are found, the procedure’s default argument values are used.
If run_mode
is GIMP_RUN_NONINTERACTIVE
, the contents of args
are
set on config
using gimp_procedure_config_set_values()
.
After setting config
‘s properties like described above, arguments
and auxiliary arguments are automatically synced from image
parasites of the same name if they were set to
GIMP_ARGUMENT_SYNC_PARASITE
with Procedure.set_argument_sync:
String properties are set to the value of the image parasite if
run_mode
is GIMP_RUN_INTERACTIVE
or GIMP_RUN_WITH_LAST_VALS
, or
if the corresponding argument is an auxiliary argument. As a
special case, a property named “gimp-comment” will default to
gimp_get_default_comment()
if there is no “gimp-comment” parasite.
After calling this function, the args
passed to run()
should be
left alone and config
be treated as the procedure’s arguments.
It is possible to get config
‘s resulting values back into args
by
calling gimp_procedure_config_get_values()
, as long as modified
args
are written back to config
using gimp_procedure_config_set_values()
before the call to gimp_procedure_config_end_run()
.
This function should be used at the beginning of a procedure’s
run()
and be paired with a call to gimp_procedure_config_end_run()
at the end of run().
Available since: 3.0
Parameters
image
-
Type:
GimpImage
A
GimpImage
orNULL
.The argument can be NULL
.The data is owned by the caller of the function. run_mode
-
Type:
GimpRunMode
The
GimpRunMode
passed to aGimpProcedure
‘srun()
args
-
Type:
GimpValueArray
The
GimpValueArray
passed to aGimpProcedure
‘srun()
The data is owned by the caller of the function.