Hello, The attached patch should fix different bugs in different plugins written in Perl in Gimp V 1.1.14. The patch is mostly an updated version of the patch I send some weeks ago. The things the patch should fix: - In the blowinout, innerbevel, randomblends, terral_text, and windify plugins the auto import tag was missing. - In the blowinout and the windify plugins different plugins were called with 1 for RUN_NONINTERACTIVE. - In the guidegrid plugin an update of the image was missing. I inserted a call to gimp_drawable_update. - Scripts in the logulator plugin which only had the arguments text_string, font_size_pixels, and font did not get defaults for this arguments. - In different Perl-plugins (logulator, xachlego, xachshadow, and xachvision) the plugins sparkle, nova, and grid were called with a wrong amount of arguments (or, in the xachshadow plugin, the arguments were wrong). - In the ditherize plugin a call to Gimp::set_trace(-1) was done. - In the frame_filter plugin the default expression could lead to a call to gauss_rle with a radius<1, which is not allowed anymore. - In the parasite-editor gimp_is_layer was called as gimp_layer. This PDB-Entry was renamed some time ago. During fixing this bugs I found some other bugs (this ones are not fixed by the attached patch): - In the Parasite Editor every click on Edit results in the error message "parasite-editor: Callback called exit.(ERROR)". - Firetext, Bricks, Map To Gradient, §D Outline, Chip Away, Comic Book, Glossy, and Textured give the error: "fire: Can't call method "add" on an undefined value at /usr/lib/perl5/site_perl/5.005/i586-linux/Gimp/UI.pm line 139. (ERROR)" This plug-ins all use PF_PATTERN or PF_GRADIENT. - Inner Bevel prints the message "innerbevel: Can't call method "set_preserve_trans" on an undefined value at /opt/gimp11//lib/gimp/1.1/plug-ins/innerbevel line 85. (ERROR)" and continues without problems. - Pixelmap gives the error: "pixelmap: dimension mismatch, pdl has dimension 4 but at /opt/gimp11//lib/gimp/1.1/plug-ins/pixelmap line 43 (ERROR)" This seems to be a problem with the default expression. I used Perl versionn 5.005_02 and Gtk-Perl version 0.6123. Regards, Frank
diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/blowinout.pl gimp-1.1.14/plug-ins/perl/examples/blowinout.pl --- orig/gimp-1.1.14/plug-ins/perl/examples/blowinout.pl Sat Dec 18 19:34:52 1999 +++ gimp-1.1.14/plug-ins/perl/examples/blowinout.pl Sun Dec 19 23:02:38 1999 @@ -3,7 +3,7 @@ # Blow In/Out # John Pitney -use Gimp 1.06; +use Gimp qw(:auto __ N_); use Gimp::Fu; # print "hello there\n"; @@ -44,11 +44,11 @@ $i * $distance / $nsteps * sin($angle * 3.14159 / 180) : $distance ** ($i/$nsteps) * sin($angle * 3.14159 / 180); gimp_edit_clear($dmlayer); - plug_in_noisify(1, $dm, $dmlayer, 0, 255, 255, 255, 0); + plug_in_noisify($dm, $dmlayer, 0, 255, 255, 255, 0); gimp_levels($dmlayer, 0, 0, 255, 1.0, 128, 255); $drawable = gimp_layer_copy($drawable, 0); gimp_image_add_layer($img, $drawable, -1); - plug_in_displace(1, $img, $drawable, $xdist, $ydist, 1, 1, $dmlayer, + plug_in_displace($img, $drawable, $xdist, $ydist, 1, 1, $dmlayer, $dmlayer, 1); if ( $inmode == 1 ) { @@ -62,11 +62,11 @@ $i * $distance / $nsteps * sin($angle * 3.14159 / 180) : $distance ** ($i/$nsteps) * sin($angle * 3.14159 / 180); gimp_edit_clear($dmlayer); - plug_in_noisify(1, $dm, $dmlayer, 0, 255, 255, 255, 0); + plug_in_noisify($dm, $dmlayer, 0, 255, 255, 255, 0); gimp_levels($dmlayer, 0, 0, 255, 1.0, 128, 255); $drawable = gimp_layer_copy($drawable, 0); gimp_image_add_layer($img, $drawable, -1); - plug_in_displace(1, $img, $drawable, $xdist, $ydist, 1, 1, $dmlayer, + plug_in_displace($img, $drawable, $xdist, $ydist, 1, 1, $dmlayer, $dmlayer, 1); if ( $inmode == 1 ) { diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/ditherize.pl gimp-1.1.14/plug-ins/perl/examples/ditherize.pl --- orig/gimp-1.1.14/plug-ins/perl/examples/ditherize.pl Sat Dec 18 19:34:52 1999 +++ gimp-1.1.14/plug-ins/perl/examples/ditherize.pl Sun Dec 19 21:28:53 1999 @@ -37,7 +37,7 @@ sub { my($image,$drawable,$dither,$colours)=@_; - Gimp::set_trace(-1); +# Gimp::set_trace(-1); $drawable->is_layer or die "this plug-in only works for layers"; diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/frame_filter gimp-1.1.14/plug-ins/perl/examples/frame_filter --- orig/gimp-1.1.14/plug-ins/perl/examples/frame_filter Sat Dec 18 19:34:52 1999 +++ gimp-1.1.14/plug-ins/perl/examples/frame_filter Mon Dec 20 21:02:57 1999 @@ -13,7 +13,7 @@ "*", [ [PF_TEXT, "expr", "the perl expression to run for each layer", - '$d->gauss_rle($P*100,1,1)'], + '$d->gauss_rle($P*100+1,1,1)'], [PF_DRAWABLE, "drawable2", "an optional extra drawable for use by the code"], ], [], diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/guidegrid gimp-1.1.14/plug-ins/perl/examples/guidegrid --- orig/gimp-1.1.14/plug-ins/perl/examples/guidegrid Sat Dec 18 19:34:52 1999 +++ gimp-1.1.14/plug-ins/perl/examples/guidegrid Sun Dec 19 04:13:53 1999 @@ -76,7 +76,9 @@ ## #$img->selection_all(); #$img->selection_none(); - + + $layer->update(0, 0, $img->height, $img->width); + return(); }; exit main; diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/innerbevel gimp-1.1.14/plug-ins/perl/examples/innerbevel --- orig/gimp-1.1.14/plug-ins/perl/examples/innerbevel Sat Dec 18 19:34:52 1999 +++ gimp-1.1.14/plug-ins/perl/examples/innerbevel Tue Dec 21 05:37:32 1999 @@ -7,7 +7,7 @@ # working btw). You can follow step by step with the website at # http://tigert.gimp.org/gimp/tutorials/beveled_text/ -use Gimp; +use Gimp qw(:auto __ N_); use Gimp::Fu; use Gimp::Util; diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/logulator gimp-1.1.14/plug-ins/perl/examples/logulator --- orig/gimp-1.1.14/plug-ins/perl/examples/logulator Sat Dec 18 19:34:52 1999 +++ gimp-1.1.14/plug-ins/perl/examples/logulator Sun Dec 19 23:05:57 1999 @@ -54,7 +54,7 @@ my($image,$drawable)=(shift,shift); $drawable->has_alpha or die "It makes no sense to call $menupath with a drawable lacking alpha!\n"; $i=0; - while($i<@_) { + while($i<=@_) { if($i==$ti) { splice @_,$i,0,"-- Text --"; } elsif ($i==$fsi) { @@ -1232,7 +1232,8 @@ plug_in_noisify ($img, $sparkle_layer, 0, 0.2, 0.2, 0.2, 0.0); plug_in_c_astretch ($img, $sparkle_layer); gimp_selection_none ($img); - plug_in_sparkle ($img, $sparkle_layer, 0.03, 0.45, min ($width, $height) / 2, 6, 15); + plug_in_sparkle ($img, $sparkle_layer, 0.03, 0.45, min ($width, $height) / 2, 6, 15, + 1.0, 1.0, 0.0, 0.0, 0, 0, 0, 0); gimp_levels ($sparkle_layer, 1, 0, 255, 0.2, 0, 255); gimp_levels ($sparkle_layer, 2, 0, 255, 0.7, 0, 255); gimp_selection_layer_alpha ($sparkle_layer); @@ -2191,7 +2192,7 @@ gimp_palette_set_background ([255, 255, 255]); gimp_edit_fill ($layer_mask); gimp_selection_none ($img); - plug_in_nova ($img, $burst_layer, @{$burst_coords}[0], cdr ($burst_coords), $burst_color, $burstradius, 100); + plug_in_nova ($img, $burst_layer, @{$burst_coords}[0], cdr ($burst_coords), $burst_color, $burstradius, 100, 0); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([0, 0, 0]); gimp_selection_feather ($img, $feather); @@ -2327,7 +2328,7 @@ gimp_palette_set_background ([31, 31, 31]); gimp_palette_set_foreground ([255, 255, 255]); gimp_blend ($text_layer, FG_BG_RGB, NORMAL_MODE, BILINEAR, 100, 0, REPEAT_NONE, 0, 0, 0, $cx, $cy, $bx, $by); - plug_in_nova ($img, $glow_layer, $novax, $novay, $glow_color, $novaradius, 100); + plug_in_nova ($img, $glow_layer, $novax, $novay, $glow_color, $novaradius, 100, 0); gimp_selection_all ($img); gimp_patterns_set_pattern ("Stone"); gimp_bucket_fill ($bump_channel, PATTERN_BUCKET_FILL, NORMAL_MODE, 100, 0, 0, 0, 0); @@ -2396,7 +2397,8 @@ gimp_selection_border ($img, $edge_size); plug_in_noisify ($img, $sparkle_layer, 0, $hit_rate, $hit_rate, $hit_rate, 0.0); gimp_selection_none ($img); - plug_in_sparkle ($img, $sparkle_layer, 0.03, 0.45, $width, 6, 15); + plug_in_sparkle ($img, $sparkle_layer, 0.03, 0.45, $width, 6, 15, + 1.0, 1.0, 0.0, 0.0, 0, 0, 0, 0); gimp_selection_load ($selection); gimp_selection_shrink ($img, $edge_size); gimp_levels ($sparkle_layer, 0, 0, 255, 1.2, 0, 255); diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/parasite-editor gimp-1.1.14/plug-ins/perl/examples/parasite-editor --- orig/gimp-1.1.14/plug-ins/perl/examples/parasite-editor Sat Dec 18 19:34:52 1999 +++ gimp-1.1.14/plug-ins/perl/examples/parasite-editor Sun Dec 19 20:50:48 1999 @@ -240,7 +240,7 @@ $attach_func = sub { shift->parasite_attach (shift) }; $detach_func = sub { shift->parasite_detach (shift) }; &$set_submenu(map [$_,$_->image->get_filename." / " - .($_->layer ? $_->layer_get_name : $_->channel_get_name)], + .($_->is_layer ? $_->layer_get_name : $_->channel_get_name)], map (($_->get_layers,$_->get_channels),Gimp->image_list)); }); $menu->append($item); diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/randomblends gimp-1.1.14/plug-ins/perl/examples/randomblends --- orig/gimp-1.1.14/plug-ins/perl/examples/randomblends Sat Dec 18 19:34:52 1999 +++ gimp-1.1.14/plug-ins/perl/examples/randomblends Sun Dec 19 23:02:47 1999 @@ -3,7 +3,7 @@ # This is adrian's idea - take random blends and difference them. You're # bound to come up w/ something cool eventually. -use Gimp; +use Gimp qw(:auto __ N_); use Gimp::Fu; use Gimp::Util; diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/terral_text gimp-1.1.14/plug-ins/perl/examples/terral_text --- orig/gimp-1.1.14/plug-ins/perl/examples/terral_text Sat Dec 18 19:34:53 1999 +++ gimp-1.1.14/plug-ins/perl/examples/terral_text Sun Dec 19 23:02:59 1999 @@ -26,7 +26,7 @@ #[terral] input levels of 0, .24, 113 [22:11] #[terral] --end of script [22:12] -use Gimp 1.06; +use Gimp qw(:auto __ N_); use Gimp::Fu; use Gimp::Util; diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/windify.pl gimp-1.1.14/plug-ins/perl/examples/windify.pl --- orig/gimp-1.1.14/plug-ins/perl/examples/windify.pl Sat Dec 18 19:34:53 1999 +++ gimp-1.1.14/plug-ins/perl/examples/windify.pl Sun Dec 19 23:03:08 1999 @@ -3,7 +3,7 @@ # sent to me by Seth Burgess <sjburges@xxxxxxxx> # small changes my Marc Lehmann <pcg@xxxxxxxx> -use Gimp; +use Gimp qw(:auto __ N_); use Gimp::Fu; #Gimp::set_trace(TRACE_CALL); @@ -21,11 +21,11 @@ gimp_image_add_layer($out,$windlayer,0); my $windlayercopy = gimp_layer_copy($windlayer, 1); gimp_image_add_layer($out,$windlayercopy,0); - plug_in_noisify(1,$out,$windlayercopy,0,$density/255, + plug_in_noisify($out,$windlayercopy,0,$density/255, $density/255, $density/255,1); - plug_in_mblur(1,$out,$windlayercopy,0,15,$angle); + plug_in_mblur($out,$windlayercopy,0,15,$angle); gimp_layer_set_mode($windlayercopy, 10); # Lighten Only gimp_image_merge_visible_layers($out,0); @@ -33,7 +33,7 @@ # gimp_image_merge_visible_layers bug my $newlay = gimp_image_get_active_layer ($out); - plug_in_displace(1,$img,$drawable,-$distance*cos($angle*180/3.14159), + plug_in_displace($img,$drawable,-$distance*cos($angle*180/3.14159), $distance*sin($angle*180/3.14159), 1,1, $newlay,$newlay, $wrap); gimp_image_remove_layer($out,$newlay); diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/xachlego.pl gimp-1.1.14/plug-ins/perl/examples/xachlego.pl --- orig/gimp-1.1.14/plug-ins/perl/examples/xachlego.pl Sat Dec 18 19:34:53 1999 +++ gimp-1.1.14/plug-ins/perl/examples/xachlego.pl Tue Dec 21 04:58:38 1999 @@ -71,7 +71,8 @@ gimp_edit_clear($gridlayer); gimp_palette_set_background([255,255,255]); gimp_edit_fill($gridlayer); - $gridlayer->plug_in_grid($blocksize, $blocksize, 0, 0); + $gridlayer->plug_in_grid(1,$blocksize,-1,[0,0,0],255, 1,$blocksize,-1,[0,0,0],255, + 0,0,0,[0,0,0],255); $gridlayer->plug_in_gauss_iir(0.7*$blocksize, 1, 1); # threshold the @@ -93,7 +94,8 @@ RGBA_IMAGE, "Grid 2", 100, 0); $img->add_layer($cleangrid,0); gimp_edit_fill($cleangrid); - $cleangrid->plug_in_grid($blocksize, $blocksize, 0, 0); + $cleangrid->plug_in_grid(1,$blocksize,-1,[0,0,0],255, 1,$blocksize,-1,[0,0,0],255, + 0,0,0,[0,0,0],255); gimp_selection_load($selection); $drawable->plug_in_bump_map($cleangrid, 135, 45, 3, 0, 0, 0, 0, 1, 0, 0); $img->selection_all; diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/xachshadow.pl gimp-1.1.14/plug-ins/perl/examples/xachshadow.pl --- orig/gimp-1.1.14/plug-ins/perl/examples/xachshadow.pl Sat Dec 18 19:34:53 1999 +++ gimp-1.1.14/plug-ins/perl/examples/xachshadow.pl Mon Dec 20 21:40:25 1999 @@ -70,7 +70,8 @@ gimp_edit_clear($gridlayer); gimp_palette_set_background([255,255,255]); gimp_edit_fill($gridlayer); - $gridlayer->plug_in_grid((1, $blocksize, 0, "black", 0) x 3); + $gridlayer->plug_in_grid(1,$blocksize,-1,[0,0,0],255, 1,$blocksize,-1,[0,0,0],255, + 0,0,0,[0,0,0],255); gimp_layer_set_mode($gridlayer, 3); # Clean up stuff diff -ru orig/gimp-1.1.14/plug-ins/perl/examples/xachvision.pl gimp-1.1.14/plug-ins/perl/examples/xachvision.pl --- orig/gimp-1.1.14/plug-ins/perl/examples/xachvision.pl Sat Dec 18 19:34:53 1999 +++ gimp-1.1.14/plug-ins/perl/examples/xachvision.pl Sun Dec 19 21:37:23 1999 @@ -41,7 +41,8 @@ $midlayer->plug_in_noisify(1,$amt, $amt, $amt, $amt); $midmask = $midlayer->create_mask(0); $img->add_layer_mask($midlayer, $midmask); - $midmask->plug_in_grid($img->height * 3, 3, 0, 0); + $midmask->plug_in_grid(1,$img->height * 3,0,[0,0,0],255, 1,3,0,[0,0,0],255, + 0,0,0,[0,0,0],255 ); $midmask->plug_in_gauss_iir(1.01, 1, 1); gimp_palette_set_background($oldbackground);