diff --git a/app/pdb/internal-procs.c b/app/pdb/internal-procs.c index 8b9dd6ca45..250080995b 100644 --- a/app/pdb/internal-procs.c +++ b/app/pdb/internal-procs.c @@ -30,7 +30,7 @@ #include "internal-procs.h" -/* 728 procedures registered total */ +/* 727 procedures registered total */ void internal_procs_init (GimpPDB *pdb) diff --git a/app/pdb/plug-in-compat-cmds.c b/app/pdb/plug-in-compat-cmds.c index eb8773c3a1..e27d67d0ff 100644 --- a/app/pdb/plug-in-compat-cmds.c +++ b/app/pdb/plug-in-compat-cmds.c @@ -916,50 +916,6 @@ plug_in_noisify_invoker (GimpProcedure *procedure, error ? *error : NULL); } -static GimpValueArray * -plug_in_spread_invoker (GimpProcedure *procedure, - Gimp *gimp, - GimpContext *context, - GimpProgress *progress, - const GimpValueArray *args, - GError **error) -{ - gboolean success = TRUE; - GimpDrawable *drawable; - gdouble spread_amount_x; - gdouble spread_amount_y; - - drawable = g_value_get_object (gimp_value_array_index (args, 2)); - spread_amount_x = g_value_get_double (gimp_value_array_index (args, 3)); - spread_amount_y = g_value_get_double (gimp_value_array_index (args, 4)); - - if (success) - { - if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, - GIMP_PDB_ITEM_CONTENT, error) && - gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error)) - { - GeglNode *node = - gegl_node_new_child (NULL, - "operation", "gegl:noise-spread", - "amount-x", (gint) spread_amount_x, - "amount-y", (gint) spread_amount_y, - "seed", g_random_int (), - NULL); - - gimp_drawable_apply_operation (drawable, progress, - C_("undo-type", "Spread"), - node); - g_object_unref (node); - } - else - success = FALSE; - } - - return gimp_procedure_get_return_values (procedure, success, - error ? *error : NULL); -} - static GimpValueArray * plug_in_threshold_alpha_invoker (GimpProcedure *procedure, Gimp *gimp, @@ -1597,54 +1553,6 @@ register_plug_in_compat_procs (GimpPDB *pdb) gimp_pdb_register_procedure (pdb, procedure); g_object_unref (procedure); - /* - * gimp-plug-in-spread - */ - procedure = gimp_procedure_new (plug_in_spread_invoker); - gimp_object_set_static_name (GIMP_OBJECT (procedure), - "plug-in-spread"); - gimp_procedure_set_static_help (procedure, - "Move pixels around randomly", - "Spreads the pixels of the specified drawable. Pixels are randomly moved to another location whose distance varies from the original by the horizontal and vertical spread amounts.", - NULL); - gimp_procedure_set_static_attribution (procedure, - "Compatibility procedure. Please see 'gegl:noise-spread' for credits.", - "Compatibility procedure. Please see 'gegl:noise-spread' for credits.", - "2013"); - gimp_procedure_add_argument (procedure, - g_param_spec_enum ("run-mode", - "run mode", - "The run mode", - GIMP_TYPE_RUN_MODE, - GIMP_RUN_INTERACTIVE, - GIMP_PARAM_READWRITE)); - gimp_procedure_add_argument (procedure, - gimp_param_spec_image ("image", - "image", - "Input image (unused)", - FALSE, - GIMP_PARAM_READWRITE)); - gimp_procedure_add_argument (procedure, - gimp_param_spec_drawable ("drawable", - "drawable", - "Input drawable", - FALSE, - GIMP_PARAM_READWRITE)); - gimp_procedure_add_argument (procedure, - g_param_spec_double ("spread-amount-x", - "spread amount x", - "Horizontal spread amount", - 0, 512, 0, - GIMP_PARAM_READWRITE)); - gimp_procedure_add_argument (procedure, - g_param_spec_double ("spread-amount-y", - "spread amount y", - "Vertical spread amount", - 0, 512, 0, - GIMP_PARAM_READWRITE)); - gimp_pdb_register_procedure (pdb, procedure); - g_object_unref (procedure); - /* * gimp-plug-in-threshold-alpha */ diff --git a/pdb/groups/plug_in_compat.pdb b/pdb/groups/plug_in_compat.pdb index b4ac83af1b..6d2cbd2cb1 100644 --- a/pdb/groups/plug_in_compat.pdb +++ b/pdb/groups/plug_in_compat.pdb @@ -575,58 +575,6 @@ CODE ); } -sub plug_in_spread { - $blurb = 'Move pixels around randomly'; - - $help = <<'HELP'; -Spreads the pixels of the specified drawable. Pixels are randomly -moved to another location whose distance varies from the original by -the horizontal and vertical spread amounts. -HELP - - &std_pdb_compat('gegl:noise-spread'); - $date = '2013'; - - @inargs = ( - { name => 'run_mode', type => 'enum GimpRunMode', dead => 1, - desc => 'The run mode' }, - { name => 'image', type => 'image', dead => 1, - desc => 'Input image (unused)' }, - { name => 'drawable', type => 'drawable', - desc => 'Input drawable' }, - { name => 'spread_amount_x', type => '0 <= double <= 512', - desc => 'Horizontal spread amount' }, - { name => 'spread_amount_y', type => '0 <= double <= 512', - desc => 'Vertical spread amount' } - ); - - %invoke = ( - code => <<'CODE' -{ - if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, - GIMP_PDB_ITEM_CONTENT, error) && - gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error)) - { - GeglNode *node = - gegl_node_new_child (NULL, - "operation", "gegl:noise-spread", - "amount-x", (gint) spread_amount_x, - "amount-y", (gint) spread_amount_y, - "seed", g_random_int (), - NULL); - - gimp_drawable_apply_operation (drawable, progress, - C_("undo-type", "Spread"), - node); - g_object_unref (node); - } - else - success = FALSE; -} -CODE - ); -} - sub plug_in_threshold_alpha { $blurb = 'Make transparency all-or-nothing'; @@ -1144,7 +1092,6 @@ CODE plug_in_plasma plug_in_rotate plug_in_noisify - plug_in_spread plug_in_threshold_alpha plug_in_waves); diff --git a/plug-ins/script-fu/scripts/coffee.scm b/plug-ins/script-fu/scripts/coffee.scm index 1cf7f4c80f..2381e1740f 100644 --- a/plug-ins/script-fu/scripts/coffee.scm +++ b/plug-ins/script-fu/scripts/coffee.scm @@ -58,9 +58,8 @@ blobSize blobSize) ) - ; Clamp spread value to 'plug-in-spread' limits. - ; This plugin calls plug-in-spread indirectly via distress-selection. - ; plug-in-spread is a compatability plug-in to gegl:noise-spread. + ; Clamp spread value to 'gegl:noise-spread' limits. + ; This plugin calls 'gegl:noise-spread' indirectly via distress-selection. ; gegl:noise-spread seems to have a limit of 512. ; Here we limit to 200, for undocumented reasons. (set! theSpread (/ theSize 25)) diff --git a/plug-ins/script-fu/scripts/distress-selection.scm b/plug-ins/script-fu/scripts/distress-selection.scm index 9d84552bcd..231dc9952f 100644 --- a/plug-ins/script-fu/scripts/distress-selection.scm +++ b/plug-ins/script-fu/scripts/distress-selection.scm @@ -84,11 +84,7 @@ (/ theHeight inGranu) TRUE) - (plug-in-spread RUN-NONINTERACTIVE - theImage - theLayer - inSpread - inSpread) + (gimp-drawable-merge-new-filter theLayer "gegl:noise-spread" 0 LAYER-MODE-REPLACE 1.0 "amount-x" inSpread "amount-y" inSpread "seed" (msrg-rand)) (plug-in-gauss RUN-NONINTERACTIVE theImage theLayer horizontalRadius verticalRadius 0) diff --git a/plug-ins/script-fu/scripts/fuzzyborder.scm b/plug-ins/script-fu/scripts/fuzzyborder.scm index 9c5b386de2..6b598e80d5 100644 --- a/plug-ins/script-fu/scripts/fuzzyborder.scm +++ b/plug-ins/script-fu/scripts/fuzzyborder.scm @@ -85,11 +85,7 @@ (/ theHeight inGranu) TRUE) - (plug-in-spread RUN-NONINTERACTIVE - theImage - theLayer - (/ inSize inGranu) - (/ inSize inGranu)) + (gimp-drawable-merge-new-filter theLayer "gegl:noise-spread" 0 LAYER-MODE-REPLACE 1.0 "amount-x" (/ inSize inGranu) "amount-y" (/ inSize inGranu) "seed" (msrg-rand)) (chris-color-edge theImage theLayer inColor 1) (gimp-layer-scale theLayer theWidth theHeight TRUE)