Drawable Multiplication

The purpose of this script is to generate multiple copies of a drawable into the image where the drawable is. It is helpful especially whenever you have to get several duplicates of a drawable, because like this you can avoid repeating the 'Duplicate Layer' or 'Duplicate Channel' commands of the GUI so many times. Moreover, this script allows to displace the duplicates of a drawable along both horizontal and vertical directions through the offset parameters, so that you can easily achieve a sequence of equidistant drawables which should be otherwise obtained step by step.
If the drawable is a layer-mask, the script will operate on the layer to which such mask belongs.
Besides creating new drawables, this script also returns a vector whose first element is the identifier of the starting drawable, whereas the identifiers of the duplicates occupy the other elements. Hence, when the script is called as procedure inside another script, such vector helps to trace every duplicate.
Once installed, you can launch this script from the image menubar through 'Edit -> Drawable Multiplication...'.
_

The two screenshots appended hereunder show how this script can help you to get three copies of a layer representing Wilber and spread them all along a diagonal of the image.
Here is a GIMP session containing the image and the dialog box of the script with its parameters set to appropriate values:


_

This is the final result:

AttachmentSize
drawable-multiplication.scm6.33 KB

Comments

Drawable Multiplication: version 1.02 available

_ RELEASE NOTES _

* Now the script can offset the duplicates even when the original drawable is a channel.
* Forced the script to be inactive if there is a floating selection inside the image.
* Reshaped and cleaned up the code.

Thank You, Gino

Works great for my perspective drawings. I'll be sure to find a multitude of other uses for this as well. :)

Good job!

Thanks for your comment, mahvin

I'm glad that you liked my script.

Syndicate content