It is currently Tue Jul 02, 2024 9:05 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 97 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Multiple Layer Actions Script Rel2 [bugfix and more actions]
PostPosted: Sat Jan 04, 2014 11:10 pm  (#21) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Thank you GinoD writing scripts for layers within groups has definitely been a challenge but with everything, there are no problems but solutions waiting to be created

The problem that 'gimp-image-get-layers' returns any pseudo group layers [which cannot be altered]has been overcome by adding this procedure many thanks to Saulgoode who worked patiently with me on this

(define (get-all-real-layers image)
    (define (get-children group)
      (let loop ((children (vector->list (cadr (gimp-item-get-children group))))
                 (sub-layers '()) )
        (if (null? children)
          (reverse sub-layers)
          (loop (cdr children)
                (if (zero? (car (gimp-item-is-group (car children))))
                  (cons (car children) sub-layers)
                  (append sub-layers (get-children (car children))) )))))
    (let loop ((top-layers (vector->list (cadr (gimp-image-get-layers image))))
               (all-layers '()) )
      (if (null? top-layers)
        all-layers
        (loop (cdr top-layers)
              (if (zero? (car (gimp-item-is-group (car top-layers))))
                (append all-layers (list (car top-layers)))
                (append all-layers (get-children (car top-layers)))) ))))

This was called by
   ((= listType 0) ;All Layers
   (set! layerList (get-all-real-layers image))

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


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Sun Jan 05, 2014 12:28 am  (#22) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Rel3 with layer group functionality has just been posted (see initial post)

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


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Sun Jan 05, 2014 2:09 am  (#23) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
Nice progress on this script, Graechan. All layers to Image size is very handy. :bigthup

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Sun Jan 05, 2014 2:31 am  (#24) 
Offline
GimpChat Member
User avatar

Joined: Jul 06, 2013
Posts: 2607
Location: California
I downloaded the update, but I don't see the layer group function.


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Sun Jan 05, 2014 2:33 am  (#25) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
GnuTux a lot of added actions will follow when I finish my adaptations for layer groups I was keen to get the 'All layers to image size'
action in there as well, as it's one I will find useful to

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


Top
 Post subject: Re: Multiple Layer Actions Script
PostPosted: Sun Jan 05, 2014 1:45 pm  (#26) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13068
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
ofnuts wrote:
Wallace wrote:
Is there something that would clear a selection on all layers. If not maybe this could be added.


See clear-layers here : https://sourceforge.net/projects/gimp-t ... s/scripts/ :)

This said there is a limit to this kind of script... either you can only have function without parameters, or you end up redoing parameter entry dialogs for every tool you use. Or you have some clever code that can read the PDB, discovers the parameters and generates a dialog on the fly...


You make a good point Ofnuts and thanks for the script link. ;)

I do have another suggestion for the "Multiple Layer Actions Script", and that would be "Desaturate" all layers/visible layers.

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


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Sun Jan 05, 2014 5:45 pm  (#27) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Mackenzieh the script now works within layer groups, it's not a option, previous releases of the script would fail if a layer group existed whereas this release won't due to the fact that 'gimp-image-get-layers' will return the ID of the 'layer group'
(which is a pseudo layer that cannot have its pixels altered).
In Rel3 I've used the call 'get-all-real-layers' that returns the children of the layer group instead
These are the layers associated with the 'layer group' and can have their pixels altered

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


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Sun Jan 05, 2014 5:52 pm  (#28) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
Is Rel3 just a bug fix of Release 1 Graechan?
Because I'm not seeing any added operations.


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Sun Jan 05, 2014 6:01 pm  (#29) 
Offline
GimpChat Member
User avatar

Joined: Jul 06, 2013
Posts: 2607
Location: California
K1TesseraEna wrote:
Is Rel3 just a bug fix of Release 1 Graechan?
Because I'm not seeing any added operations.


That is also my question as well because, I too am not seeing any added operations.


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Sun Jan 05, 2014 6:09 pm  (#30) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
K1TesseraEna Rel3 is a bugfix of Rel2 not Rel1 now I can add additional Actions without the script failing due to the reasons given above to Mackenzieh
Ditto to Mackenzieh please be patient as I needed to get the scripts framework correct

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


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Sun Jan 05, 2014 6:29 pm  (#31) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
If you run the filter on any group it works. That is the fix folks. :)
Works well Graechan. I can't wait to see more added functions.

_________________
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: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Sun Jan 05, 2014 6:42 pm  (#32) 
Offline
GimpChat Member
User avatar

Joined: Jul 06, 2013
Posts: 2607
Location: California
Rod wrote:
If you run the filter on any group it works. That is the fix folks. :)
Works well Graechan. I can't wait to see more added functions.



Oh, okay. Thanks Rod for explaining it. :)


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Mon Jan 06, 2014 2:01 am  (#33) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
new Action list coming tomorrow in Rel4
"Set Invisible"
"Set Visible"
"Invert"
"Clear Selection"
"Layer to Image Size"
"Semi-Flatten"
"Flatten"
"Add Alpha"
"Remove Layer From Image"

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


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Mon Jan 06, 2014 10:01 pm  (#34) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Graechan can you add export to any file format supported by GIMP?
Something like the export_layers script?
http://registry.gimp.org/node/28268
SVG, PATTERNS,GIH,GBR,JPG,PNG ect..ect

_________________
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: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Mon Jan 06, 2014 11:05 pm  (#35) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
Rod wrote:
Graechan can you add export to any file format supported by GIMP?
Something like the export_layers script?
http://registry.gimp.org/node/28268
SVG, PATTERNS,GIH,GBR,JPG,PNG ect..ect



This is a good idea Rod, except for svg export.
Paths in gimp are not associated with any layer(s) in particular,
that would definitely require the script name/description change.

I like the idea as a concept for a separate script, though,
merge linked, diverge, export linked paths. etc. as svg(s)


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Tue Jan 07, 2014 3:06 am  (#36) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
I was sorting and updating my collection of script and i found a few that may integrate well

Something i often want do to layers is make all seamless, Gimp built in "make seamless " filter is not too good, to use a euphemism, my favorite is RobA " RR make seamless " http://gimpscripts.com/2013/08/rr-make-seamless/ that has a little flaw, can't be repeated.
appear in "repeat last filter" but greyed out.

would be nice have for all layers

Also to complete there is "Tileable Filters" also from RobA that contains

Quote:
This script creates the following new menu entries (modeled after the Tileable Blur provided in Gimp already):

Filters >Distorts >Tileable Emboss
Filters >Blur >Tileable Motion Blur
Filters >Distorts >Tileable Wind
Filters >Light and Shadow >Tileable Sparkle
Filters >Noise >Tileable Slur
Filters >Noise >Tileable Spread
Filters >Artistic >Tileable Cubism
Filters >Artistic >Tileable Oilify
Filters >Artistic >Tileable Photocopy
Filters >Artistic >Tileable Softglow


REALLY TOO MUCH menu entries to my taste, yet this battery of seamless filters is very useful, it would be nice have them more grouped and adapted to run on all layers

Then i stumble on Esamulko page , https://sites.google.com/site/elsamuko/gimp he has some excellent filters in his arsenal,
my favorite ,to be applied to all layer are for very different reasons and in random order

Escape lines https://sites.google.com/site/elsamuko/gimp/escape-line
SPROCKET HOLES !! :yes the best sprocket holes i found https://sites.google.com/site/elsamuko/gimp/sprocket
and for special effect :
the National Geographic style https://sites.google.com/site/elsamuko/gimp/ng
And a cupe version of "300 movie" style https://sites.google.com/site/elsamuko/gimp/300

many also include a batch version (not sure if may help )
and there are much more there , as the 2 for sharpening without halo https://sites.google.com/site/elsamuko/ ... on-sharpen https://sites.google.com/site/elsamuko/gimp/eaw-sharpen ,
a good emulation of old" Photocrom" lithographies https://sites.google.com/site/elsamuko/gimp/photochrom
and vintage https://sites.google.com/site/elsamuko/gimp/vintage and much more
https://sites.google.com/site/elsamuko/gimp/lomo
But i can' propose everything...well there is also a very nice lomo script https://sites.google.com/site/elsamuko/gimp/lomo
BUT would complicate installations because to work require Esamulko Curve presets ( scroll down ! https://sites.google.com/site/elsamuko/gimp/lomo) installed, ...are cool presets i suggest to install them anyway, but i fear that have to install additional folders may confuse or discourage


Well a lot but i am not suggesting to include everything
i think the Sprocket Hole , Escapes lines and National Geographic Style may be of large interest

That and RobA battery of make seamless and tileable filters




,

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Multiple Layer Actions Script
PostPosted: Tue Jan 07, 2014 4:28 am  (#37) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Quote:
I wrote (it did not, of course, support layer groups). I also recall making a later version that copied the active layer's blend mode or opacity to the target layers, but I can't locate the code for that.


Saulgood ,i am not sure if is the same you can't locate but i have a copy of 1 of your script that , yes, add the merging mode used to the new layer name

To be exact is a modified version of "new layer from visible"
the most relevant difference with "new layer from visible" is that the focus is not shifted on the new layer , but the active layer remain the same after running the script
And the second is that the name of new layer embeds the layermode used

With this difference become a fantastic tool to experiment and confront face to face result of different layer mode:
you may find 1 good combination of mode and transparency, run the script to save it (as new layer) , try another, save and so on

Normally focus shift, so you should reactivate the right layer, and even worse is hard kept trace of the various combination

I love that script , it saved me a lot of times , if you couldn't find i may search on my HD, just let me know

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Tue Jan 07, 2014 5:15 pm  (#38) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Photocomics, I appreciate the offer, but I already have your script. The one to which I previously alluded was from a time before I started maintaining my scripts using Fossil, and I don't think I ever shared it publicly.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Tue Jan 07, 2014 6:06 pm  (#39) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Hello Saulgoode.
I have a question:
Is it possible - for all layers (in order):
Alpha to selection -> Selection to path.
It refers to the rapid conversion of ttf font files to svg.
(http://gimpchat.com/viewtopic.php?f=12&t=3002&start=10%20#%20p123355)

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: Multiple Layer Actions Script Rel3 [Allowed for layer groups]
PostPosted: Tue Jan 07, 2014 6:43 pm  (#40) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
MareroQ wrote:
Hello Saulgoode.
I have a question:
Is it possible - for all layers (in order):
Alpha to selection -> Selection to path.
It refers to the rapid conversion of ttf font files to svg.

Yes, it is possible (nearly trivial), however, if the original layer is a text layer than it would be better to create the path using 'gimp-vectors-new-from-text-layer'. This will avoid degradation of the font owing to the rendering of the font followed by conversion to a selection followed by conversion to a path.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
Post new topic Reply to topic  [ 97 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Unable to export jpg after added a new layer

14

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

0

No new posts Attachment(s) Multiple Layer Shadow plugin

0

No new posts How do I script a new white layer to the bottom of the layer stack

7

No new posts Attachment(s) Remaking Photoshop Actions in GIMP

9



* Login  



Powered by phpBB3 © phpBB Group