It is currently Sat Jun 20, 2026 2:38 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 1:25 am  (#1) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Does anybody know of a procedure in GIMP's PDB that returns whether a Layer Group is collapsed or expanded? Or any other way for a script to determine this?

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


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: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 1:41 am  (#2) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
I don't know of one and I'd be surprised if there was. That's purely a user interface function and isn't it the LAW that scripts can't alter the user interface? (So no zooming etc)


Top
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 2:30 am  (#3) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Well, it's current utility seems to be limited to user interface functionality, however, unlike all other user interface settings, the state is associated with the Image, not the View or any of the Preferences; and its state is saved with the image. This suggests that the reason for the LAW* you mentioned doesn't fully apply (i.e., there is no chance of confusion arising owing to misconfiguration of the interface).

* For what it's worth, I disagree with the existence of this LAW. While there is possibility of a script causing grief by changing user interface settings, there is also much to be said for allowing scripts to control the configuration.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 8:32 am  (#4) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
From a scripting point of view, why would you need to know whether the group is expanded or collapsed?

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


Top
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 11:42 am  (#5) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
GnuTux wrote:
From a scripting point of view, why would you need to know whether the group is expanded or collapsed?

Theoretically speaking, the state could be useful for choosing targets of the script's operations. For example, merge the layers in all collapsed groups; or change the font of all text layers in expanded groups (retaining the fonts in collapsed groups).

But the reason I actually want to know this detail is so that I can write an XCF viewer that would be able to display on a web page not only the rendered image, but the layer stack, channels, and paths for the image.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 3:29 pm  (#6) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
saulgoode wrote:
Theoretically speaking, the state could be useful for choosing targets of the script's operations. For example, merge the layers in all collapsed groups; or change the font of all text layers in expanded groups (retaining the fonts in collapsed groups).

I suppose it could be useful to target a script's operation based on the state of any UI element. While it doesn't seem to be that practical of an approach, due to confusion that could occur on the part of the user, I can see how in some cases, it could be useful. It's certainly common to use, for example: the currently selected pattern, gradient or colors in a script.

saulgoode wrote:
But the reason I actually want to know this detail is so that I can write an XCF viewer that would be able to display on a web page not only the rendered image, but the layer stack, channels, and paths for the image.

Why would the state of the UI in GIMP matter to an external XCF viewer?

Thanks!

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


Top
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 4:48 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Nov 16, 2011
Posts: 5127
Location: Metro Vancouver, BC
saulgoode wrote:
But the reason I actually want to know this detail is so that I can write an XCF viewer that would be able to display on a web page not only the rendered image, but the layer stack, channels, and paths for the image.
A viewer (Lightroom mini) is what Gimp needs, if you can pull that one off that would be great. A basic xcf, gif, jpg, pdf, tiff, png, svg plugin viewer (maybe even with shellout) would be a bonus. I could add .raw but that might be asking too much.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 6:59 pm  (#8) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Odinbc wrote:
A viewer (Lightroom mini) is what Gimp needs, if you can pull that one off that would be great


I've heard others say that as well but still don't understand why...maybe my workflow are different or something... Can you help me by explaining how you would use such a feature from in Gimp?

-RobA>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 8:58 pm  (#9) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Odinbc wrote:
A viewer (Lightroom mini) is what Gimp needs, if you can pull that one off that would be great. A basic xcf, gif, jpg, pdf, tiff, png, svg plugin viewer (maybe even with shellout) would be a bonus. I could add .raw but that might be asking too much.

That's not really what I had in mind. I want to be able to post XCF files directly on a web page (in particular, a MediaGoblin photo collection) and be able to display not only the image, but the layerstack as well. Basically, a screenshot of the layers dialog, but it has to be done on-the-fly and on a headless server (the script would render a PNG image of the Layers dialog for displaying).

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 9:36 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Nov 16, 2011
Posts: 5127
Location: Metro Vancouver, BC
RobA wrote:
Odinbc wrote:
A viewer (Lightroom mini) is what Gimp needs, if you can pull that one off that would be great


I've heard others say that as well but still don't understand why...maybe my workflow are different or something... Can you help me by explaining how you would use such a feature from in Gimp?

-RobA>
I use image viewers (Xnview or Irfanview) all the time with Gimp, having a native one would seem to be more efficient. I find the thumbnails view in the file picker to be inconsistent. XCF is not supported by very many image viewers.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 9:56 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Nov 16, 2011
Posts: 5127
Location: Metro Vancouver, BC
saulgoode wrote:
That's not really what I had in mind. I want to be able to post XCF files directly on a web page (in particular, a MediaGoblin photo collection) and be able to display not only the image, but the layerstack as well. Basically, a screenshot of the layers dialog, but it has to be done on-the-fly and on a headless server (the script would render a PNG image of the Layers dialog for displaying).
That looks like an interesting site, I will have a better look later.
Would PNG sprites and a bit of Z-index CSS work for you?
CSS WebSprites script.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group