You are here

Cascade (Tile) Layer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
AttachmentSize
CascadeLayer.scm34.41 KB

Purpose:
1) Creates a border using the current layer.
2) Positions and cascades a layer relative to the image.
(i.e. Top Left to Bottom Right, Left to Right, etc.)
You can specify how many times to cascade the layer, with the default being 0, which
means fill the image in the specified direction. If you use 1, it will position the
layer to the selected starting position. You can also specify the x and y spacing for
cascading, and the initial x and y position.
3) Create a checkerboard pattern from the layer.
4) Create a tessellation pattern from the layer.
5) Fill with the layer.

Note: This is the first script I've posted, so go easy on me. I'm a beginner.

It can be run from here:

Script-Fu/Effects Layer/Make border using layer
Script-Fu/Effects Layer/Position and Cascade layer

I need to add a choice to merge down the layers when it's done.

-------------------------------------------

Rel 01.01 Changed RGBA to RGB*

I fixed this and tested it, but let me know if you still have problems with it. I normally work with layers that have an alpha channel, but I didn't intend to restrict the script to those only.

-------------------------------------------

Rel 01.02 Changed RGB* to RGB*,GRAY*

Sorry about the quick post of 01.01. I didn't realize I could specify both types. I tested this one too.

GIMP Version: 
Scripting Engine: 

Comments

I tried out the script. I can use it once but If I undo and try to run the script again, the script is grayed out and I have to refresh scripts to use it again.

Nixnine, the behavior you describe is likely owing to your image being in either Indexed or Grayscale mode, or that your layer does not have an alpha channel.

After refreshing your scripts, this script's menu command should still be grayed if your layer is not RGB with an alpha channel. Unfortunately, there appears to be bug (https://bugzilla.gnome.org/show_bug.cgi?id=586451) in the software which results in the menu commands being available when they shouldn't be (until you do something to change the image or view).

To the author of this script (ACC), unless there is some reason you do not want your script to work with grayscale images, I would suggest that you change the command constraints for this script from "RGBA" to "RGB*,GRAY*". If an alpha channel is needed by your script and the layer does not have one, your script can add one with the 'gimp-layer-add-alpha' procedure (note: it is safe to call this procedure on layers that already have an alpha).

I would also recommend that the script be updated so that the commands are registered using 'script-fu-menu-register'. This will allow support of the Repeat Last (CTRL+F) and Re-Show Last (CTRL+SHIFT+F) commands.

I see it in the Repeat Last (CTRL+F) and Re-Show Last (CTRL+SHIFT+F) commands without having script-fu-menu-register, so does this mean it works differently on different platforms/versions? I'll look into adding that next. (First I want to fix a few other scripts I have, for the RGB*,GRAY* change.) Thanks for your inputs on this. It helped me.

What version of GIMP are you using? I can run it, undo it, and run it again, numerous times. Was the active layer still the one you wanted to cascade? The menu choices are grayed out if I'm on the background layer, instead of the layer I want to cascade. This script works on an active layer that is not the background layer.

I fixed this and tested it, but let me know if you still have problems with it. I normally work with layers that have an alpha channel, but I didn't intend to restrict the script to those only.

Subscribe to Comments for "Cascade (Tile) Layer"