It is currently Tue Apr 23, 2024 1:17 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 19 posts ] 
Author Message
 Post subject: Run Script On Multiple Layers?
PostPosted: Mon Feb 27, 2017 12:51 pm  (#1) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
I'm looking to run Bevel Reflect Logo on an image,
with 50+ layers.
Using the menu location,
Filters>Alpha To Logo>Bevel Reflect Logo.

I really don't want to run the script 50+ times for each layer.

Is there a script,
or some way that this can be done,
to save me some render time?
:puzzled

Any help or suggestions,
would be greatly appreciated.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


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: Run Script On Multiple Layers?
PostPosted: Mon Feb 27, 2017 2:01 pm  (#2) 
Offline
GimpChat Member

Joined: Sep 20, 2016
Posts: 293
Maybe click the chain link ?


Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Mon Feb 27, 2017 2:56 pm  (#3) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
Konstantin wrote:
Maybe click the chain link ?

I wish it were that easy.
Unfortunately,
linking the layers doesn't work.
:(
I'm thinking,
that it would need to be an action which the BRL script itself would have to provide,
or something another script would be able to execute,
using the BRL script as it base operation.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Mon Feb 27, 2017 3:02 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jun 06, 2016
Posts: 1033
I have previously copied layers into a very wide canvas (with transparent room between them) and after the run, and cut and pasted back to layers. It was not BRL
but if BRL will work on the alpha to selected areas it might be an option for you!
How large are your layers?


Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Mon Feb 27, 2017 3:37 pm  (#5) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
animicule wrote:
I have previously copied layers into a very wide canvas (with transparent room between them) and after the run, and cut and pasted back to layers. It was not BRL
but if BRL will work on the alpha to selected areas it might be an option for you!
How large are your layers?

Each layer is 153x167,
not very large.
I already tried doing it as you suggest.
However,
the e-map doesn't deliver consistent results,
when done this way.

What I mean is,
that some of the images have dark and light contrasts in different areas.
Due to the e-map being applied to the entire image and not applied to each separate image.
If this makes any sense?
:oops:

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Mon Feb 27, 2017 3:59 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jun 06, 2016
Posts: 1033
Yes, it makes sense. Are you doing a font?
I modified a program to run layer effects on each of the 90+
font named layers. Maybe that would work for you.
I could try putting brl in there instead layer effects.
Maybe that would work.


Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Mon Feb 27, 2017 4:14 pm  (#7) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
animicule wrote:
Yes, it makes sense. Are you doing a font?
I modified a program to run layer effects on each of the 90+
font named layers. Maybe that would work for you.
I could try putting brl in there instead layer effects.
Maybe that would work.

I didn't want to reveal the nature of this project,
but yes I'm making a font.

Seems like you're suggesting using another program other than Gimp?

Perhaps this might work,
although I'm not keen on installing programs,
which I may only use once.

Nonetheless,
I'm willing to give it a try.
If it can be worked out?

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Mon Feb 27, 2017 4:22 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jun 06, 2016
Posts: 1033
No, you may have already used this plug-in -- the one where you pick the font
and it generates an xcf file with individual layers. Sorry, at work and
don't remember but maybe called font to layers.py
I modified that program to add the layer effects onto the characters layers also.
Has an issue with one of the layer effects, but not the bevel/emboss. I think
it was pattern overlay does something to the layer size and crashes.
The other issue being it merges the effect to the font at each step,
so it doesn't look as good as doing them by hand. (the layer effects will
create layer groups if you don't set the layer effect to merge,
and the font to layers script doesn't deal well with the layer groups). --- Unless I am doing something wrong with the Layer Effects and there is a setting somewhere to tell to just generate new layers and not the layer groups.


Last edited by animicule on Mon Feb 27, 2017 5:26 pm, edited 1 time in total.

Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Mon Feb 27, 2017 5:21 pm  (#9) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Start by setting all layers visible with the top layer set preview and merge with layer on and adjust your settings, now set preview of and click OK, now use down arrow to select the next layer, use [control]f, use down arrow to select next layer and continue.
Seems a lot, try frames modify from GAP That's no good you need to use a batch script.

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Last edited by Graechan on Mon Feb 27, 2017 5:43 pm, edited 1 time in total.

Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Mon Feb 27, 2017 5:33 pm  (#10) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
On second thought...
I'm going to do it manually.

It will take a bit more time,
but I'll get the correct effect I'm looking for with each layer.

Thanks for all the suggestions,
much appreciated.

:bigthup

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Wed Mar 01, 2017 12:12 pm  (#11) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
2 scripts that do the same thing. But I wrote the one in scheme because i want it to be SCROLLABLE diaglog input window.

Bevel Reflect Logo to visible layers Script for GIMP (scheme) (SCROLLABLE)
Bevel Reflect Logo to visible layers script for GIMP (python) (NOT SCROLLABLE)

_________________
TinT


Last edited by trandoductin on Wed Nov 28, 2018 11:41 am, edited 1 time in total.

Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Wed Mar 01, 2017 12:45 pm  (#12) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
trandoductin wrote:
2 scripts that do the same thing. But I wrote the one in scheme because i want it to be SCROLLABLE diaglog input window.


:coolthup
Thank you trandoductin.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Thu Mar 02, 2017 1:33 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
I've been running the 3D Bevel script, manually for each layer, on a file having 70-80 layers. It's a pain, but until I can find a way, it's the only way I know how. I too would be interested in this.

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Thu Mar 02, 2017 2:00 am  (#14) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
What or where is the 3D bevel script?
I can just make one for it to execute layers.
But Wallace asked for script that would be able to execute last used filter on visible layers. Such a script could be possible if i only knew where GIMP saves that last filter used and parameters used for it.
If GIMP does save that information some I hope it does it after the filter is executed and not before executing it.
Because if it saves it before executing it, then if such a script can be written it won't work because then GIMP will think that's the last filter used. and would execute the script so the script would have no chance of knowing the last executed script...because it would be itself.

_________________
TinT


Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Thu Mar 02, 2017 6:45 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
trandoductin wrote:
What or where is the 3D bevel script?
I can just make one for it to execute layers.
But Wallace asked for script that would be able to execute last used filter on visible layers. Such a script could be possible if i only knew where GIMP saves that last filter used and parameters used for it.
If GIMP does save that information some I hope it does it after the filter is executed and not before executing it.
Because if it saves it before executing it, then if such a script can be written it won't work because then GIMP will think that's the last filter used. and would execute the script so the script would have no chance of knowing the last executed script...because it would be itself.

Maybe it could be written to just apply CTRL + F or the current KEYBOARD SHORTCUT being used for apply the last filter? Then "ARROW DOWN" to apply it again to the next layer until you reach the bottom most layer? Not sure if you can code keyboard shortcuts or not. Just an idea.

_________________
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: Run Script On Multiple Layers?
PostPosted: Thu Mar 02, 2017 6:51 am  (#16) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
trandoductin wrote:
2 scripts that do the same thing. But I wrote the one in scheme because i want it to be SCROLLABLE diaglog input window.

Bevel Reflect Logo to visible layers Script for GIMP (scheme) (SCROLLABLE)
Bevel Reflect Logo to visible layers script for GIMP (python) (NOT SCROLLABLE)

There is a way to create 2 "COLUMNS" in Python dialogs utilizing Bytes and Pixels gimpfu.py file.
viewtopic.php?f=9&t=4292&start=80#p55308

_________________
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: Run Script On Multiple Layers?
PostPosted: Thu Mar 02, 2017 12:32 pm  (#17) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Rod wrote:
trandoductin wrote:
What or where is the 3D bevel script?
I can just make one for it to execute layers.
But Wallace asked for script that would be able to execute last used filter on visible layers. Such a script could be possible if i only knew where GIMP saves that last filter used and parameters used for it.
If GIMP does save that information some I hope it does it after the filter is executed and not before executing it.
Because if it saves it before executing it, then if such a script can be written it won't work because then GIMP will think that's the last filter used. and would execute the script so the script would have no chance of knowing the last executed script...because it would be itself.

Maybe it could be written to just apply CTRL + F or the current KEYBOARD SHORTCUT being used for apply the last filter? Then "ARROW DOWN" to apply it again to the next layer until you reach the bottom most layer? Not sure if you can code keyboard shortcuts or not. Just an idea.

I don't think i can code keyboard inputs. I was thinking user could use ghost mouse to just record down arrow key and ctrl F but then you don't know when to stop the script as when you hit down on the bottom most layer you're still on that layer so your ghost mouse script would have to be copied the number of times and it's also blind to visible/invisible layers.
That repeat last filter has to be saved somewhere in GIMP I mean where else is it coming from right?

_________________
TinT


Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Mon Mar 06, 2017 4:08 pm  (#18) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
trandoductin wrote:
What or where is the 3D bevel script?
I can just make one for it to execute layers.
But Wallace asked for script that would be able to execute last used filter on visible layers. Such a script could be possible if i only knew where GIMP saves that last filter used and parameters used for it.
If GIMP does save that information some I hope it does it after the filter is executed and not before executing it.
Because if it saves it before executing it, then if such a script can be written it won't work because then GIMP will think that's the last filter used. and would execute the script so the script would have no chance of knowing the last executed script...because it would be itself.


Sorry I didn't respond sooner.
Here is a link to the thread that has the script download.
viewtopic.php?f=9&t=14188&start=9

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: Run Script On Multiple Layers?
PostPosted: Mon Mar 06, 2017 9:50 pm  (#19) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
PhotoMaster wrote:
trandoductin wrote:
What or where is the 3D bevel script?
I can just make one for it to execute layers.
But Wallace asked for script that would be able to execute last used filter on visible layers. Such a script could be possible if i only knew where GIMP saves that last filter used and parameters used for it.
If GIMP does save that information some I hope it does it after the filter is executed and not before executing it.
Because if it saves it before executing it, then if such a script can be written it won't work because then GIMP will think that's the last filter used. and would execute the script so the script would have no chance of knowing the last executed script...because it would be itself.


Sorry I didn't respond sooner.
Here is a link to the thread that has the script download.
viewtopic.php?f=9&t=14188&start=9


I tried to write with bevel3d and that bevel3d script is weird, it's not atomic like i expected. i called it on 2 visible layers and it seems that the latest layer overwrites the result of the first one when called in script. but when i manually call it twice i get 2 extra layers. It's confusing the heck out of me.

_________________
TinT


Top
Post new topic Reply to topic  [ 19 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Multiple Layers Attributes/Mode .scm Updated

0

No new posts MULTIPLE GIDES

3

No new posts Attachment(s) add multiple guides

5

No new posts Multiple Continuous Droste GIF

1

No new posts Attachment(s) SETUP MULTIPLE GUIDES

2



* Login  



Powered by phpBB3 © phpBB Group