Commit 9be37aaa authored by Michael Natterer's avatar Michael Natterer

plug-ins, pdb: remove the diffraction plug-in and add a PDB compat procedure

parent 932401e0
......@@ -28,7 +28,7 @@
#include "internal-procs.h"
/* 749 procedures registered total */
/* 750 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)
......
This diff is collapsed.
......@@ -50,8 +50,6 @@
/despeckle.exe
/destripe
/destripe.exe
/diffraction
/diffraction.exe
/displace
/displace.exe
/edge
......
......@@ -68,7 +68,6 @@ libexec_PROGRAMS = \
depth-merge \
despeckle \
destripe \
diffraction \
displace \
edge \
edge-dog \
......@@ -587,23 +586,6 @@ destripe_LDADD = \
$(INTLLIBS) \
$(destripe_RC)
diffraction_SOURCES = \
diffraction.c
diffraction_LDADD = \
$(libgimpui) \
$(libgimpwidgets) \
$(libgimpmodule) \
$(libgimp) \
$(libgimpmath) \
$(libgimpconfig) \
$(libgimpcolor) \
$(libgimpbase) \
$(GTK_LIBS) \
$(RT_LIBS) \
$(INTLLIBS) \
$(diffraction_RC)
displace_SOURCES = \
displace.c
......
This diff is collapsed.
......@@ -22,7 +22,6 @@ decompose_RC = decompose.rc.o
depth_merge_RC = depth-merge.rc.o
despeckle_RC = despeckle.rc.o
destripe_RC = destripe.rc.o
diffraction_RC = diffraction.rc.o
displace_RC = displace.rc.o
edge_RC = edge.rc.o
edge_dog_RC = edge-dog.rc.o
......
......@@ -23,7 +23,6 @@
'depth-merge' => { ui => 1 },
'despeckle' => { ui => 1 },
'destripe' => { ui => 1 },
'diffraction' => { ui => 1 },
'displace' => { ui => 1 },
'edge' => { ui => 1 },
'edge-dog' => { ui => 1 },
......
......@@ -27,7 +27,6 @@ plug-ins/common/decompose.c
plug-ins/common/depth-merge.c
plug-ins/common/despeckle.c
plug-ins/common/destripe.c
plug-ins/common/diffraction.c
plug-ins/common/displace.c
plug-ins/common/edge.c
plug-ins/common/edge-dog.c
......
......@@ -857,6 +857,91 @@ CODE
);
}
sub plug_in_diffraction {
$blurb = 'Generate diffraction patterns';
$help = <<'HELP';
Help? What help?
HELP
&std_pdb_compat('gegl:diffraction-patterns');
$date = '2015';
@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 => 'lam_r', type => '0.0 <= float <= 20.0',
desc => 'Light frequency (red)' },
{ name => 'lam_g', type => '0.0 <= float <= 20.0',
desc => 'Light frequency (green)' },
{ name => 'lam_b', type => '0.0 <= float <= 20.0',
desc => 'Light frequency (blue)' },
{ name => 'contour_r', type => '0.0 <= float <= 10.0',
desc => 'Number of contours (red)' },
{ name => 'contour_g', type => '0.0 <= float <= 10.0',
desc => 'Number of contours (green)' },
{ name => 'contour_b', type => '0.0 <= float <= 10.0',
desc => 'Number of contours (blue)' },
{ name => 'edges_r', type => '0.0 <= float <= 1.0',
desc => 'Number of sharp edges (red)' },
{ name => 'edges_g', type => '0.0 <= float <= 1.0',
desc => 'Number of sharp edges (green)' },
{ name => 'edges_b', type => '0.0 <= float <= 1.0',
desc => 'Number of sharp edges (blue)' },
{ name => 'brightness', type => '0.0 <= float <= 1.0',
desc => 'Brightness and shifting/fattening of contours' },
{ name => 'scattering', type => '0.0 <= float <= 100.0',
desc => 'Scattering (Speed vs. quality)' },
{ name => 'polarization', type => '-1.0 <= float <= 1.0',
desc => 'Polarization' }
);
%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;
gint x, y, width, height;
gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height);
node = gegl_node_new_child (NULL,
"operation", "gegl:diffraction-patterns",
"red-frequency", lam_r,
"green-frequency", lam_g,
"blue-frequency", lam_b,
"red-contours", contour_r,
"green-contours", contour_g,
"blue-contours", contour_b,
"red-sedges", edges_r,
"green-sedges", edges_g,
"blue-sedges", edges_b,
"brightness", brightness,
"scattering", scattering,
"polarization", polarization,
"width", width,
"height", height,
NULL);
gimp_drawable_apply_operation (drawable, progress,
C_("undo-type", "Diffraction Patterns"),
node);
g_object_unref (node);
}
else
success = FALSE;
}
CODE
);
}
sub plug_in_engrave {
$blurb = 'Simulate an antique engraving';
......@@ -3435,6 +3520,7 @@ CODE
plug_in_convmatrix
plug_in_cubism
plug_in_deinterlace
plug_in_diffraction
plug_in_engrave
plug_in_exchange
plug_in_flarefx
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment