It is currently Thu Apr 18, 2024 6:08 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Scripting Help
PostPosted: Mon Jun 29, 2015 11:57 am  (#1) 
Offline
New Member

Joined: Jun 29, 2015
Posts: 3
So im complety new to making scripts and alot of the guides just go straight over my head so what im trying to do is make a script that will make a new layer from visble and be able to set layer modes what in dummy speak of course is the quickest way to do that and if theres a plugin that does it already Great! cause i havent been able to find it and that would also accomplish what im trying to do


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: Scripting Help
PostPosted: Mon Jun 29, 2015 1:09 pm  (#2) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13007
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
If you navigate to Layers>New from Visible, you can create a layer from all the layers that are visible.
As you see in the screenshot below the layer created is named "Visible".
You can then change this new (visible) layer's mode to whatever mode you wish.
Image

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


Top
 Post subject: Re: Scripting Help
PostPosted: Mon Jun 29, 2015 1:49 pm  (#3) 
Offline
New Member

Joined: Jun 29, 2015
Posts: 3
I can do that, but i want a script to do it cause i use bimp to process my photos and i just want to add a multiply layer to 100+ photos along with a couple of other things


Top
 Post subject: Re: Scripting Help
PostPosted: Mon Jun 29, 2015 2:22 pm  (#4) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13007
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
Terra wrote:
I can do that, but i want a script to do it cause i use bimp to process my photos and i just want to add a multiply layer to 100+ photos along with a couple of other things

Oh okay... :oops:
The plot thickens. I'm not a scriptwriter and in your initial post these other processes were not mentioned.
However you may be able to do this using the G'MIC command line tool. Unfortunately I don't know much about how to use this tool either.
I would recommend Graechan, who is among one of our top scriptwriters we're lucky to have here on Gimp Chat.

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


Top
 Post subject: Re: Scripting Help
PostPosted: Mon Jun 29, 2015 4:03 pm  (#5) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
Terra wrote:
So im complety new to making scripts and alot of the guides just go straight over my head so what im trying to do is make a script that will make a new layer from visble and be able to set layer modes what in dummy speak of course is the quickest way to do that and if theres a plugin that does it already Great! cause i havent been able to find it and that would also accomplish what im trying to do


In Python:
layer = pdb.gimp_layer_new_from_visible(image, image, '-- Visible --')
image.add_layer(layer,0)
layer.mode=MULTIPLY_MODE


Just wrap that into some registration code and there you go.

_________________
Image


Top
 Post subject: Re: Scripting Help
PostPosted: Mon Jun 29, 2015 4:09 pm  (#6) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
:ninja

@Terra:
Try this script:
Attachment:
Terra-visible-to-mult-layer.scm [856 Bytes]
Downloaded 154 times

Just copy to your user scripts folder and then refresh filters.
You should then find the procedure under Filters > Terra


Top
 Post subject: Re: Scripting Help
PostPosted: Tue Jun 30, 2015 4:39 pm  (#7) 
Offline
New Member

Joined: Jun 29, 2015
Posts: 3
Ty the help

jontait2 wrote:
:ninja

@Terra:
Try this script:
Attachment:
Terra-visible-to-mult-layer.scm

Just copy to your user scripts folder and then refresh filters.
You should then find the procedure under Filters > Terra


now a second part came up i tried to use it with bimp and its not showing up in the list that BIMP has for other procedures anyway i can make it be useable by bimp? beyond that it does exactly what i need and ty for the actual making of it


Top
 Post subject: Re: Scripting Help
PostPosted: Tue Jun 30, 2015 7:39 pm  (#8) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
@Terra
Unfortunately, the BIMP plugin deliberately ignores procedures with names ending in "-layer".
So I've changed the procedure name slightly, and you should find this version listed in BIMP like this:

Image

Attachment:
Terra-visible-to-mult-layer-v1.scm [853 Bytes]
Downloaded 143 times


Top
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Scripting GEGL functions

52

No new posts Attachment(s) Normal Map scripting function

6

No new posts Attachment(s) Scripting my head into a wall - Any help would be appreciated

1



* Login  



Powered by phpBB3 © phpBB Group