Properly handle PDB_LAYERs and PDB_CHANNELs when passed by the menus in

2006-11-18  Simon Budig  <simon@gimp.org>

	* plug-ins/script-fu/script-fu-scripts.c: Properly handle PDB_LAYERs
	and PDB_CHANNELs when passed by the menus in the resp. dialogs
This commit is contained in:
Simon Budig 2006-11-18 01:59:14 +00:00 committed by Simon Budig
parent 02de3076c9
commit 0b33ffc674
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-11-18 Simon Budig <simon@gimp.org>
* plug-ins/script-fu/script-fu-scripts.c: Properly handle PDB_LAYERs
and PDB_CHANNELs when passed by the menus in the resp. dialogs
2006-11-17 Michael Natterer <mitch@gimp.org>
Got rid of the word "editor" were it was good for nothing but

View File

@ -804,6 +804,20 @@ script_fu_script_proc (const gchar *name,
min_args++;
}
if (nparams > 2 && params[2].type == GIMP_PDB_LAYER &&
script->num_args > 1 && script->arg_types[1] == SF_LAYER)
{
script->arg_values[1].sfa_layer = params[2].data.d_layer;
min_args++;
}
if (nparams > 2 && params[2].type == GIMP_PDB_CHANNEL &&
script->num_args > 1 && script->arg_types[1] == SF_CHANNEL)
{
script->arg_values[1].sfa_channel = params[2].data.d_channel;
min_args++;
}
if (nparams > 2 && params[2].type == GIMP_PDB_VECTORS &&
script->num_args > 1 && script->arg_types[1] == SF_VECTORS)
{