It is currently Tue May 07, 2024 12:14 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Rotator (batch rotator for making brushes)
PostPosted: Thu Jun 30, 2011 2:11 pm  (#1) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
I've no idea if a script like this exists, and I was too lazy to search, so I wrote one.

It's still very crude, I haven't had the time to polish it up, and it has some minor glitches - like the order of the layers won't be entirely correct if there's more than one layer in the image, but other than that it works ok.

Now, what it does is, basically: it takes the current layer, and makes X rotated copies of it, so that the layer is rotated a full 360 - in other words, if you select 36 layers, they are stepped at 10 degrees, and so on.

What is it useful for? Of course for making directional brushes! Manually copying and rotating a 100 (the maximum allowed by the .gih format) copies of a layer is very tiresome, so if you want to make cool brushes that follow the direction of the cursor, this is the way to do it.

Now, like I said, it's still at development phase, and I haven't had the time to polish it up (if someone wants to do it, be my guest, otherwise I'll get to it when I have the chance) so there's still a glitch in the layer ordering if you have more than one layers in the image. It's not a big glitch and the script is still useful.

Those who have made their own brushes know that colourless brushes need to be saved as a grayscale image, and transparency is marked by white colour (ie. the value channel is inverted and used as alpha for the brush) so the script automatically fills any transparent areas of the copies with white, if the image is a grayscale image. If it's an RGB image, it won't do that, since multicolour brushes are handled differently.

Anyway, I mainly wrote this script for myself, but then I thought others might find it useful too, so here it is:

http://www.fileden.com/files/2010/2/7/2 ... rotator.py

It installs in filter/distorts.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Thu Jun 30, 2011 2:20 pm  (#2) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
small example

Image


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Thu Jun 30, 2011 2:30 pm  (#3) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
RobA has something similar in scheme:

http://registry.gimp.org/node/583

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Thu Jun 30, 2011 2:50 pm  (#4) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
thanks for sharing DD.....

_________________
Image


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Fri Jul 01, 2011 6:59 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
dd it's good to see you again! :)
How have you been?

Thanks for the cool script by the way.
I can't use it in Gimp-2.6 but it works in 2.7.3

Cheers!

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Fri Jul 01, 2011 8:09 am  (#6) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I gave your plug-in a try. I also have RobA's so now I have two rotator brush-makers. :mrgreen:

It works great, dd.

It's a chain link. Wish I knew how t make them actually linked inside of each other.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Fri Jul 01, 2011 8:51 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12521
Thanks dd; have RobA's script, but gave your plugin a try; like the barbed wire brush by the way. :)


Attachments:
thanks.png
thanks.png [ 244.84 KiB | Viewed 2867 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Fri Jul 01, 2011 8:52 am  (#8) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
It would probably be appreciated if the script saved the user's original foreground color (using gimp-context-push/-pop).

Also, I don't think it matters that you perform a 'gimp-selection-layer-alpha' because the Python-fu fill() method does not honor the selection. You should double-check this as I haven't delved too deeply into Python (nor do I intend to), but I believe the fill method corresponds to "pdb.gimp-drawable-fill()" and not "pdb.gimp-edit-fill()" (and if you were to use the "pdb.gimp-edit-fill()" method then the result probably would not be what you'd want anyway).

I think Python's drawable.fill() method might potentially cause problems with the UNDOability of certain scripts because 'gimp-drawable-fill' is not UNDOable. This is not (to my understanding) a problem for your script because you are using it on a layer that your script creates from scratch, but it would be a problem if the fill() method were used on an existing layer. To be honest, I don't understand why Python-fu offers it as a method given its limitations and intended purpose (and yet 'gimp-edit-fill' is not available :hoh ).

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Fri Jul 01, 2011 2:42 pm  (#9) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
Oregonian wrote:
I gave your plug-in a try. I also have RobA's so now I have two rotator brush-makers. :mrgreen:

It works great, dd.

It's a chain link. Wish I knew how t make them actually linked inside of each other.

Image


The secret to this is making the linking portion of the chain the core of the image. I guess it would be worth a shot to see if it would actually work. Not sure if it will.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Fri Jul 01, 2011 4:36 pm  (#10) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
mahvin wrote:
The secret to this is making the linking portion of the chain the core of the image. I guess it would be worth a shot to see if it would actually work. Not sure if it will.
I understand what you mean but they don't line up on a curve. A single brush on a straight line works fine.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Fri Jul 01, 2011 5:57 pm  (#11) 
Offline
GimpChat Member

Joined: Mar 29, 2011
Posts: 346
Location: Wisconsin
Oregonian wrote:
I understand what you mean but they don't line up on a curve. A single brush on a straight line works fine.

Have you seen this chain brush:
Gimp Chain Brush by Chrisdesign
It isn't a flat chain, but...

_________________
Image


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Fri Jul 01, 2011 6:18 pm  (#12) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
bkh1914 wrote:
Have you seen this chain brush:
Gimp Chain Brush by Chrisdesign
It isn't a flat chain, but...
Ah! Thanks bkh! I think the secret that makes it work is the flat turned link. Need to work with that in mind.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Fri Jul 01, 2011 8:22 pm  (#13) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
Now I am curious as to how a stroked path would treat the chain (probably the same as the animation).

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Fri Jul 01, 2011 8:38 pm  (#14) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
mahvin wrote:
Now I am curious as to how a stroked path would treat the chain (probably the same as the animation).
I made an ellipse and saved it to path. That chain is the result of that stroked path.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Sat Jul 02, 2011 12:00 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12521
Thanks for that link bkh; even left Chris a comment at Deviant. Fantastic approach to creating the chain; trying to create alternating interlinks as a brush is next too impossible though, but this chain's still fantastic. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Sat Jul 02, 2011 6:42 am  (#16) 
Offline
GimpChat Member

Joined: Mar 29, 2011
Posts: 346
Location: Wisconsin
Chris has quite a few interesting animated brushes in his gallery:
GIMP Brushes by Chrisdesign

_________________
Image


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Sat Jul 02, 2011 6:56 am  (#17) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
thanks for sharing bkh1914. I nabbed 6 of them. :teeth

_________________
Image


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Sat Jul 02, 2011 7:28 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Apr 08, 2010
Posts: 5420
Location: Northwest Ohio
hahaha, I love Follow the Ant!


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Sat Jul 02, 2011 7:56 am  (#19) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
yah cute huh..... Maybe I will paint them red so they will bite.

_________________
Image


Top
 Post subject: Re: Rotator (batch rotator for making brushes)
PostPosted: Sat Jul 16, 2011 12:43 am  (#20) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
Rod wrote:
dd it's good to see you again! :)
How have you been?


Thanks. Been a bit busy with rl things (summer and everything). I'll try to visit more often :)

Quote:
Thanks for the cool script by the way.
I can't use it in Gimp-2.6 but it works in 2.7.3

Cheers!


That's weird, because I use 2.6 - are you getting any error messages?


Top
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Batch Create Layers

2

No new posts Attachment(s) converting 32 bit images to 8 bit using batch script

5

No new posts ofnut colormap-to-layer plugin + BATCH

0

No new posts Attachment(s) Problem with David's Batch Processor plugin

22

No new posts Attachment(s) Seeking Help with First Multi-File Batch Script

9


cron

* Login  



Powered by phpBB3 © phpBB Group