It is currently Tue Jun 18, 2013 10:12 pm


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]




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

Joined: Apr 23, 2010
Posts: 842
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?

_________________
There are two types of people in the world. Those who believe in the principle of bivalence, and those who do not.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Profile  
 

 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 2:41 am  (#2) 
Offline
Gimp Scripts Editor
User avatar

Joined: Jun 22, 2010
Posts: 599
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
 Profile  
 
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 3:30 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Apr 23, 2010
Posts: 842
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.

_________________
There are two types of people in the world. Those who believe in the principle of bivalence, and those who do not.


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

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

_________________
Image


Top
 Profile  
 
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 12:42 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Apr 23, 2010
Posts: 842
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.

_________________
There are two types of people in the world. Those who believe in the principle of bivalence, and those who do not.


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

Joined: May 22, 2008
Posts: 2268
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!

_________________
Image


Top
 Profile  
 
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 5:48 pm  (#7) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 1868
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.4, Vista 32, Ubuntu 12x, median user
Gimp Chat Tutorials Index


Top
 Profile  
 

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

Joined: Jul 14, 2010
Posts: 501
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
 Profile  
 
 Post subject: Re: Layer Group collapsed procedure?
PostPosted: Wed Mar 27, 2013 9:58 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Apr 23, 2010
Posts: 842
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).

_________________
There are two types of people in the world. Those who believe in the principle of bivalence, and those who do not.


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

Joined: Nov 16, 2011
Posts: 1868
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.4, Vista 32, Ubuntu 12x, median user
Gimp Chat Tutorials Index


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

* Login  

* Subscribe to Gimp Chat's RSS Feed    * Subscribe to Gimp Chat's Tutorial RSS Feed


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group