Re: [Gimp-developer] Drawing zones
Hi, On Fri, 2007-01-19 at 21:23 -0300, Manuel Quiñones wrote: > PD: I know this kind of discussion may bother developers, and I > understand you are leading to a major release for us all. So, why not > open a mailing list dedicated to gimp-scripting? I ask questions about > scripting in the gimp-users mailing list, but they may sound too > technical for normal users. IMO it's fine to discuss scripting here. If another mailing-list was created, I would have to monitor it anyway and I would expect other developers to do that as well. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
2007/1/18, Thorsten Wilms <[EMAIL PROTECTED]>: > On Thu, Jan 18, 2007 at 02:57:30AM -0300, Manuel Quiñones wrote: > > I've had a similar idea than yours, and implemented it right away. But > > instead of changing zones with keystrokes, the zone can be selected > > using the crosspoint of two perpendicular guides. I know this is ugly, > > and maybe your idea about changing to next/previous zone is better. > > Here it is: > (...) > > http://wiki.gimp.org/gimp/DrawingZones > > I like the idea of using a layer and a palette to draw the zones. > Even though I talked about hard edges, I (and everyone else drawing) > need anti-aliased ones in almost all cases :} You are right. It's trivial to add anti-aliasing zones, and I'll add them for the next release. Also it will be better to get rid of the palette, but I found no method to automatically get the basic colors from a layer. This can be done interactively using Import Palette with an image, and setting "number of colors" option to the number of zones. Doing that I get a palette with the basic colors of the layer. Anyone knows a scriptable method for this? > > The selection via 2 guides isn't practical, of course. I understand why > you do it for now, lets hope there will be a solution. Yes. However, I'm planning to add functions to go to the next/previous zone as Joao and David said. PD: I know this kind of discussion may bother developers, and I understand you are leading to a major release for us all. So, why not open a mailing list dedicated to gimp-scripting? I ask questions about scripting in the gimp-users mailing list, but they may sound too technical for normal users. Regards, Manuel - Ocultar texto citado - > > > -- > Thorsten Wilms > > Thorwil's Creature Illustrations: > http://www.printfection.com/thorwil > > ___ > Gimp-developer mailing list > Gimp-developer@lists.XCF.Berkeley.EDU > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer > ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
Hi, On Thu, 2007-01-18 at 10:10 +0100, Thorsten Wilms wrote: > > http://bugzilla.gnome.org/show_bug.cgi?id=86274 > > > If I understand the whole thread, it's about another way > to select any layer, not only one that has highest z-order > and non-zero alpha at a specific location (pointer). No, it's explicitely about making it easier to select one of the layers below the mouse pointer. That could probably be extended to selecting the one with the highest z-order. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On 1/18/07, Thorsten Wilms <[EMAIL PROTECTED]> wrote: I usually work with a bunch of alpha-locked layers (paint shape in flat-colour, lock alpha, paint shadows, light, texture ...) I guess the perfect zone implementation would actualy need some overlap to have the same effect of alpha-locked layers. In fact, the best simple solution could be to copy selection masks onto > layer masks. Like, you have a 'painting' layer, and when you change zones: >1. Any changes are saved onto the underlying layer >2. The entire content of the underlying layer is copied to the paint > layer >3. The layer mask is copied from the next zone-mask (channel) > > This would play well with my 'apply paint' plugin, which applies any paint > on a layer (specially marked by name, beginning with the character '+') to > the underlying layer and then clears it to a neutral color. In short, drawing zones happening on the level of layer masks? Drawing zones happening by layer masks. This would allow you to decrease the total layer count needed while maintaining cleanness. Another model I thought about would require a graph, so I guess it's really a bit far out for GIMP: Having a layer/node for Ehe, have you poked around with the GEGL editor at all? As GIMP begins to use GEGL more and more, there are various almost 'free' features that would be a side effect of using GEGL: Graph based image model (most likely shown as a simplification of the underlying GEGL graph), hence Layer grouping also. Adjustment layers Those are the most relevant features. I've heard that the painting system would also be GEGL-based, so what you describe below may be possible (though it would probably be after 2.6 at the least.) compositing drawing layers/nodes. It would be like a free-form multi-split view on a number of layers. Drawing starting in one zone of the view and continuing the stroke outside of it could paint on the underlying layer/node, maintaining the advantage that using layers has now: you can draw below a layer and later change the shape of an upper layer without having to fill a gap. What you describe is not exactly a graph -- because the destination is variable. I can think of a design with a few additional nodes that would make it work though. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On Thu, Jan 18, 2007 at 08:04:28PM +1030, David Gowers wrote: > >I like the idea of using a layer and a palette to draw the zones. > >Even though I talked about hard edges, I (and everyone else drawing) > >need anti-aliased ones in almost all cases :} > > > Well, the simple case of that is easily done -- I just inserted two lines in > my zonemap tool that automatically antialias the zone mask using potrace. I > think that repeatedly drawing in a non-binary selection is a mistake, though > -- layer masks or 'preserve layer alpha' do it better. > > I rarely ever use antialiased selections for drawing, only exclusively for > fills (either color fills, alpha-clearing fills, or editing layer masks). > Drawing into AAed selections makes selecting objects a no-win (ie. cannot > get a perfect result, because the colors along the edges are uncontrolled) > situation, and dirties colors. I usually work with a bunch of alpha-locked layers (paint shape in flat-colour, lock alpha, paint shadows, light, texture ...) I guess the perfect zone implementation would actualy need some overlap to have the same effect of alpha-locked layers. > In fact, the best simple solution could be to copy selection masks onto > layer masks. Like, you have a 'painting' layer, and when you change zones: >1. Any changes are saved onto the underlying layer >2. The entire content of the underlying layer is copied to the paint > layer >3. The layer mask is copied from the next zone-mask (channel) > > This would play well with my 'apply paint' plugin, which applies any paint > on a layer (specially marked by name, beginning with the character '+') to > the underlying layer and then clears it to a neutral color. In short, drawing zones happening on the level of layer masks? Another model I thought about would require a graph, so I guess it's really a bit far out for GIMP: Having a layer/node for compositing drawing layers/nodes. It would be like a free-form multi-split view on a number of layers. Drawing starting in one zone of the view and continuing the stroke outside of it could paint on the underlying layer/node, maintaining the advantage that using layers has now: you can draw below a layer and later change the shape of an upper layer without having to fill a gap. -- Thorsten Wilms Thorwil's Creature Illustrations: http://www.printfection.com/thorwil ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On 1/18/07, Thorsten Wilms <[EMAIL PROTECTED]> wrote: On Thu, Jan 18, 2007 at 02:57:30AM -0300, Manuel Quiñones wrote: > I've had a similar idea than yours, and implemented it right away. But > instead of changing zones with keystrokes, the zone can be selected > using the crosspoint of two perpendicular guides. I know this is ugly, > and maybe your idea about changing to next/previous zone is better. > Here it is: (...) > http://wiki.gimp.org/gimp/DrawingZones I like the idea of using a layer and a palette to draw the zones. Even though I talked about hard edges, I (and everyone else drawing) need anti-aliased ones in almost all cases :} Well, the simple case of that is easily done -- I just inserted two lines in my zonemap tool that automatically antialias the zone mask using potrace. I think that repeatedly drawing in a non-binary selection is a mistake, though -- layer masks or 'preserve layer alpha' do it better. I rarely ever use antialiased selections for drawing, only exclusively for fills (either color fills, alpha-clearing fills, or editing layer masks). Drawing into AAed selections makes selecting objects a no-win (ie. cannot get a perfect result, because the colors along the edges are uncontrolled) situation, and dirties colors. In fact, the best simple solution could be to copy selection masks onto layer masks. Like, you have a 'painting' layer, and when you change zones: 1. Any changes are saved onto the underlying layer 2. The entire content of the underlying layer is copied to the paint layer 3. The layer mask is copied from the next zone-mask (channel) This would play well with my 'apply paint' plugin, which applies any paint on a layer (specially marked by name, beginning with the character '+') to the underlying layer and then clears it to a neutral color. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On Thu, Jan 18, 2007 at 07:56:47AM +0100, Sven Neumann wrote: > Hi, > > On Wed, 2007-01-17 at 18:03 +0100, Thorsten Wilms wrote: > > > Thinking some more about this, a "switch to highest in the stack > > layer with non-zero alpha at pointer location", option, triggered > > on button/pen-down before drawing is actually executed could > > do the trick while been least intrusive in GIMP. > > This is to some extent already handled in > http://bugzilla.gnome.org/show_bug.cgi?id=86274 If I understand the whole thread, it's about another way to select any layer, not only one that has highest z-order and non-zero alpha at a specific location (pointer). [Anyway, this made me think about showing layers as tabs on the image window or doing Apple Expose style thumbnailing or the variation of it in MS Vista.] -- Thorsten Wilms Thorwil's Creature Illustrations: http://www.printfection.com/thorwil ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On Thu, Jan 18, 2007 at 02:57:30AM -0300, Manuel Quiñones wrote: > I've had a similar idea than yours, and implemented it right away. But > instead of changing zones with keystrokes, the zone can be selected > using the crosspoint of two perpendicular guides. I know this is ugly, > and maybe your idea about changing to next/previous zone is better. > Here it is: (...) > http://wiki.gimp.org/gimp/DrawingZones I like the idea of using a layer and a palette to draw the zones. Even though I talked about hard edges, I (and everyone else drawing) need anti-aliased ones in almost all cases :} The selection via 2 guides isn't practical, of course. I understand why you do it for now, lets hope there will be a solution. -- Thorsten Wilms Thorwil's Creature Illustrations: http://www.printfection.com/thorwil ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On Wed, Jan 17, 2007 at 10:30:32PM -0200, Joao S. O. Bueno Calligaris wrote: > I have the followwing proposal: > what if one had a set of pre-loaded selections, and could switch back > and forth among then with a single keystroke - Do you (and others) > think it could be as usefull/more usefull/just the same as these > proposed drawing zones? Useful, yes. Just the same no. You need to explicitly switch and keep track of the order of selections to navigate efficiently. > Ok, you can imagine that what it brings of convenience for some it > brings of complication to certain user groups. Well, I think drawing zones could have a tab like layers and co, so the feature could stay completely hidden if someone wishes so. > The idea I propose, instead, would use already existing objects, like > this: one would store his drawing zones as a set of selections, each > in a separate image channel, and a simple script, with no imput > parameters, would replace the current selection with a selection in > the channel stack. > > Todo this manually, one would have to: > 1) select the channel tab in the layers/channels dock > 2) select the apropriate channel > 3) click on "channel to selection" > 4) change back to the layers tab on the dock > 5) select the actyual layer where one is drawing back > 6) start painting. > > Looking at this, it si a lot of work, and the drawing zones seems a > better idea. > However, a script fu can perform steps 1-5 with a single keystroke (if > one will select the next/same/previous channel on the stack that has > been previusly used). so it becomes: > 1) hit key that changes teh selection until the desired selection is > set > 2) start painting > > Which seems as practical as the drawing zones proposal. > > There is a final advantage in this proposal: it is ready for serving > _now_,a s writing such a script would take less than 30min. > > What do you say? It's just not the same, but cool nonetheless and I'm glad my proposal has led to thinking and experimentation and propably useful scripts :) -- Thorsten Wilms Thorwil's Creature Illustrations: http://www.printfection.com/thorwil ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
I've had a similar idea than yours, and implemented it right away. But instead of changing zones with keystrokes, the zone can be selected using the crosspoint of two perpendicular guides. I know this is ugly, and maybe your idea about changing to next/previous zone is better. Here it is: http://www.box.net/public/arhs7a3h9m I'm sorry but not direct link. I cannot register it to the gimp registry, because of http errors. And a fine tutorial: http://wiki.gimp.org/gimp/DrawingZones Regards, Manuel 2007/1/17, David Gowers <[EMAIL PROTECTED]>: > > > > On 1/18/07, Joao S. O. Bueno Calligaris <[EMAIL PROTECTED]> wrote: > > Ok - I've read the request and got the idea. > > > > I have the followwing proposal: > > what if one had a set of pre-loaded selections, and could switch back > > and forth among then with a single keystroke - Do you (and others) > > think it could be as usefull/more usefull/just the same as these > > proposed drawing zones? > > > > Why do I ask this? > > Because implementing what you are asking requires some fiddling in the > > core, and will complicate the interface with another kind of object, > > besides selections, channels, layers, masks, guides, sample points > > and the grid... > > > > Ok, you can imagine that what it brings of convenience for some it > > brings of complication to certain user groups. > > > > The idea I propose, instead, would use already existing objects, like > > this: one would store his drawing zones as a set of selections, each > > in a separate image channel, and a simple script, with no imput > > parameters, would replace the current selection with a selection in > > the channel stack. > > > > Todo this manually, one would have to: > > 1) select the channel tab in the layers/channels dock > > 2) select the apropriate channel > > 3) click on "channel to selection" > > 4) change back to the layers tab on the dock > > 5) select the actyual layer where one is drawing back > > 6) start painting. > > > > Looking at this, it si a lot of work, and the drawing zones seems a > > better idea. > > However, a script fu can perform steps 1-5 with a single keystroke (if > > one will select the next/same/previous channel on the stack that has > > been previusly used). so it becomes: > > 1) hit key that changes teh selection until the desired selection is > > set > > 2) start painting > > > > Which seems as practical as the drawing zones proposal. > > > > There is a final advantage in this proposal: it is ready for serving > > _now_,a s writing such a script would take less than 30min. > > > > What do you say? > > > > js > > -><- > > That sounds good. It allows some sort of status display (make the active > zone the only visible channel) and is flexible. > It misses one of the values of binary, mutually-exclusive selections, though > -- they can all be stored in > one channel, and if you decide a certain area should belong to a different > zone, you only have to fill that area on one channel. > > In Python, this is fairly simple to implement: > * Name the channel like "10-Zonemap; Current: AA" >(layertattoo-Zonemap; current: XX) > > * The cycle op extracts the 'current' specifier (ranging 00-ff -- ie a > pixel intensity in hex) and chooses the next unique value found in the > channel. It loads the zonemap into the selection and thresholds it > accordingly. > Then it updates the channel name: "10-Zonemap; Current: CC" > > I want this, so I'll implement it today. > > ___ > Gimp-developer mailing list > Gimp-developer@lists.XCF.Berkeley.EDU > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer > > > ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
I've had a similar idea than yours, and implemented it right away. But instead of changing zones with keystrokes, the zone can be selected using the crosspoint of two perpendicular guides. I know this is ugly, and maybe your idea about changing to next/previous zone is better. Here it is: http://www.box.net/public/arhs7a3h9m I'm sorry but not direct link. I cannot register it to the gimp registry, because of http errors. And a fine tutorial: http://wiki.gimp.org/gimp/DrawingZones Regards, Manuel 2007/1/17, Joao S. O. Bueno Calligaris <[EMAIL PROTECTED]>: > Ok - I've read the request and got the idea. > > I have the followwing proposal: > what if one had a set of pre-loaded selections, and could switch back > and forth among then with a single keystroke - Do you (and others) > think it could be as usefull/more usefull/just the same as these > proposed drawing zones? > > Why do I ask this? > Because implementing what you are asking requires some fiddling in the > core, and will complicate the interface with another kind of object, > besides selections, channels, layers, masks, guides, sample points > and the grid... > > Ok, you can imagine that what it brings of convenience for some it > brings of complication to certain user groups. > > The idea I propose, instead, would use already existing objects, like > this: one would store his drawing zones as a set of selections, each > in a separate image channel, and a simple script, with no imput > parameters, would replace the current selection with a selection in > the channel stack. > > Todo this manually, one would have to: > 1) select the channel tab in the layers/channels dock > 2) select the apropriate channel > 3) click on "channel to selection" > 4) change back to the layers tab on the dock > 5) select the actyual layer where one is drawing back > 6) start painting. > > Looking at this, it si a lot of work, and the drawing zones seems a > better idea. > However, a script fu can perform steps 1-5 with a single keystroke (if > one will select the next/same/previous channel on the stack that has > been previusly used). so it becomes: > 1) hit key that changes teh selection until the desired selection is > set > 2) start painting > > Which seems as practical as the drawing zones proposal. > > There is a final advantage in this proposal: it is ready for serving > _now_,a s writing such a script would take less than 30min. > > What do you say? > > js > -><- > > > On Tuesday 16 January 2007 20:54, David Gowers wrote: > > On 1/17/07, Thorsten Wilms <[EMAIL PROTECTED]> wrote: > > > Hi! > > > > > > So I was asked to suggest new features on the mailing-list and > > > only file bug report after they have been discussed there ... and > > > it seems theres a misunderstanding to be resolved and i wouldn't > > > mind more exposure for this ... :) > > > > > > > > > My proposal is about an alternative to using either layers > > > or saved selections to draw on areas of an image with sharp > > > edges between them. > > > > > > http://bugzilla.gnome.org/attachment.cgi?id=80388 > > > > > > Shows a typical case, ignoring the background we have > > > two such areas: body and hand. > > > > > > Drawing zones are about dividing the image into 2 or more > > > (non-overlapping) regions. These zones would be a bit like > > > multiple selections. If you start drawing in one zone, you can't > > > draw over another zone without releasing the mouse-button / > > > lifting the pen (same effect as drawing outside of the current > > > selection). > > > > > > Such a feature would remove the need for using layers and moving > > > between them > > > or constantly changing selections in cases where adjacent areas > > > need sharp edges between them. > > > > > > Using layers would mean constant switching between them. Same for > > > selections. Long mouse-ways in both cases. Zones, once setup > > > could be left active for long durations. > > > > > > This has nothing to do with split-views, Sven, as the image is > > > shown the same way, not in parts. You would just need marching > > > ants or similar for the zone extents and the ability to hide > > > them. > > > > > > If it's still unclear, I'll provide graphical explanation. > > > > > > > > > http://bugzilla.gnome.org/show_bug.cgi?id=397237 > > > > This would be wonderfully useful to me for CGing. You would need to > > be able to define zones per-layer - It would only greatly reduce > > the need for layers, not obviate them completely, for example when > > I'm making an alternate coloration or remake of something, I like > > to paste it over the original as a new layer, and use the enter key > > to toggle it's visibility. > > > > I think you would have to use saved selections rather than layers, > > to avoid the strange 'sibling-effects-sibling' behaviour (ie one > > layer is real, other is zonemasks, but they're both in the same > > list). If you specified a rule such as 'zonemasks are always the > > layer immediately abo
Re: [Gimp-developer] Drawing zones
Hi, On Wed, 2007-01-17 at 18:03 +0100, Thorsten Wilms wrote: > Thinking some more about this, a "switch to highest in the stack > layer with non-zero alpha at pointer location", option, triggered > on button/pen-down before drawing is actually executed could > do the trick while been least intrusive in GIMP. This is to some extent already handled in http://bugzilla.gnome.org/show_bug.cgi?id=86274 Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On 1/18/07, Manuel Quiñones <[EMAIL PROTECTED]> wrote: I've had a similar idea than yours, and implemented it right away. But instead of changing zones with keystrokes, the zone can be selected using the crosspoint of two perpendicular guides. I know this is ugly, and maybe your idea about changing to next/previous zone is better. Here it is: http://www.box.net/public/arhs7a3h9m I'm sorry but not direct link. I cannot register it to the gimp registry, because of http errors. And a fine tutorial: http://wiki.gimp.org/gimp/DrawingZones Regards, Manuel That gives me an idea: Sample points are probably quite appropriate to use here. We just need a PDB interface to access them. My implementation of my idea is attached. It ISN'T a plugin, it's just a module that can be copy+pasted into a plugin. (or in my case, imported. I have written >360k of libraries for pygimp so I set up PyGimp to be able to find them) def zonemapInfo(drawable): """Return a (maybe newly created) zone map and the currently selected area number""" import gimp tattoo = drawable.tattoo channels = drawable.image.channels searchstring = '%d-Zonemap;' % tattoo # if there isn't one, just create one. channels = filter(lambda v: v.name.startswith (searchstring), channels) if len (channels) == 0: # create a new zonemap image = drawable.image zonemap = gimp.Channel (image, '%d-Zonemap; Current: 00' % drawable.tattoo, image.width, image.height, 100.0, gimp.get_foreground()) from gimpenums import FOREGROUND_FILL zonemap.fill (FOREGROUND_FILL) image.add_channel(zonemap) return zonemap, 0 zonemap = channels[0] import re current = re.findall("[0-9]+-Zonemap; Current: ([0-9a-fA-F]{2,2})",zonemap.name)[0] current = int (current, 16) return zonemap, current def nextZonemapValue (zm, thisv): """Return the next area number used in the zonemap""" import gimp pr = zm.get_pixel_rgn(0,0, zm.width, zm.height, True, False) data = pr[:,:] r = range((thisv+1) % 256, 256) if r[0] > 0: # wraparound r.extend (range (0, thisv + 1)) for v in r: if chr(v) in data: return v return 0 def cycleZonemap(drawable): """Cycle to the next area defined in the zonemap""" zonemap,activepoint = zonemapInfo (drawable) nextv = nextZonemapValue (zonemap, activepoint) drawable.image.undo_group_start() from gimp import pdb pdb.gimp_selection_load(zonemap) from ai.gimp.pibgimp.tools import threshold threshold(drawable.image.selection, nextv, nextv) zonemap.name = '%d-Zonemap; Current: %02x' % (drawable.tattoo, nextv) drawable.image.undo_group_end() def enforceZonemap(drawable): """Limit the selection to the currently selected zonemap area""" zonemap,activepoint = zonemapInfo (drawable) # intersect the thresholded zonemap with the selection. drawable.image.undo_group_start() tmp = zonemap.copy() zonemap.image.add_channel (tmp) from ai.gimp.pibgimp.tools import threshold saved = drawable.image.selection.copy() drawable.image.add_channel(saved) # channel apply import gimp gimp.pdb.gimp_selection_none (drawable.image) threshold(tmp, activepoint, activepoint) gimp.pdb.gimp_selection_load (saved) drawable.image.remove_channel (saved) gimp.delete (saved) from gimpenums import CHANNEL_OP_INTERSECT, CHANNEL_OP_REPLACE op = CHANNEL_OP_INTERSECT if gimp.pdb.gimp_selection_is_empty (drawable.image): op = CHANNEL_OP_REPLACE gimp.pdb.gimp_channel_combine_masks (drawable.image.selection, tmp, op, 0, 0) #gimp.pdb.gimp_selection_sharpen(drawable.image) zonemap.image.remove_channel (tmp) gimp.delete(tmp) drawable.image.undo_group_end() ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On 1/18/07, Joao S. O. Bueno Calligaris <[EMAIL PROTECTED]> wrote: Ok - I've read the request and got the idea. I have the followwing proposal: what if one had a set of pre-loaded selections, and could switch back and forth among then with a single keystroke - Do you (and others) think it could be as usefull/more usefull/just the same as these proposed drawing zones? Why do I ask this? Because implementing what you are asking requires some fiddling in the core, and will complicate the interface with another kind of object, besides selections, channels, layers, masks, guides, sample points and the grid... Ok, you can imagine that what it brings of convenience for some it brings of complication to certain user groups. The idea I propose, instead, would use already existing objects, like this: one would store his drawing zones as a set of selections, each in a separate image channel, and a simple script, with no imput parameters, would replace the current selection with a selection in the channel stack. Todo this manually, one would have to: 1) select the channel tab in the layers/channels dock 2) select the apropriate channel 3) click on "channel to selection" 4) change back to the layers tab on the dock 5) select the actyual layer where one is drawing back 6) start painting. Looking at this, it si a lot of work, and the drawing zones seems a better idea. However, a script fu can perform steps 1-5 with a single keystroke (if one will select the next/same/previous channel on the stack that has been previusly used). so it becomes: 1) hit key that changes teh selection until the desired selection is set 2) start painting Which seems as practical as the drawing zones proposal. There is a final advantage in this proposal: it is ready for serving _now_,a s writing such a script would take less than 30min. What do you say? js -><- That sounds good. It allows some sort of status display (make the active zone the only visible channel) and is flexible. It misses one of the values of binary, mutually-exclusive selections, though -- they can all be stored in one channel, and if you decide a certain area should belong to a different zone, you only have to fill that area on one channel. In Python, this is fairly simple to implement: * Name the channel like "10-Zonemap; Current: AA" (layertattoo-Zonemap; current: XX) * The cycle op extracts the 'current' specifier (ranging 00-ff -- ie a pixel intensity in hex) and chooses the next unique value found in the channel. It loads the zonemap into the selection and thresholds it accordingly. Then it updates the channel name: "10-Zonemap; Current: CC" I want this, so I'll implement it today. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
Ok - I've read the request and got the idea. I have the followwing proposal: what if one had a set of pre-loaded selections, and could switch back and forth among then with a single keystroke - Do you (and others) think it could be as usefull/more usefull/just the same as these proposed drawing zones? Why do I ask this? Because implementing what you are asking requires some fiddling in the core, and will complicate the interface with another kind of object, besides selections, channels, layers, masks, guides, sample points and the grid... Ok, you can imagine that what it brings of convenience for some it brings of complication to certain user groups. The idea I propose, instead, would use already existing objects, like this: one would store his drawing zones as a set of selections, each in a separate image channel, and a simple script, with no imput parameters, would replace the current selection with a selection in the channel stack. Todo this manually, one would have to: 1) select the channel tab in the layers/channels dock 2) select the apropriate channel 3) click on "channel to selection" 4) change back to the layers tab on the dock 5) select the actyual layer where one is drawing back 6) start painting. Looking at this, it si a lot of work, and the drawing zones seems a better idea. However, a script fu can perform steps 1-5 with a single keystroke (if one will select the next/same/previous channel on the stack that has been previusly used). so it becomes: 1) hit key that changes teh selection until the desired selection is set 2) start painting Which seems as practical as the drawing zones proposal. There is a final advantage in this proposal: it is ready for serving _now_,a s writing such a script would take less than 30min. What do you say? js -><- On Tuesday 16 January 2007 20:54, David Gowers wrote: > On 1/17/07, Thorsten Wilms <[EMAIL PROTECTED]> wrote: > > Hi! > > > > So I was asked to suggest new features on the mailing-list and > > only file bug report after they have been discussed there ... and > > it seems theres a misunderstanding to be resolved and i wouldn't > > mind more exposure for this ... :) > > > > > > My proposal is about an alternative to using either layers > > or saved selections to draw on areas of an image with sharp > > edges between them. > > > > http://bugzilla.gnome.org/attachment.cgi?id=80388 > > > > Shows a typical case, ignoring the background we have > > two such areas: body and hand. > > > > Drawing zones are about dividing the image into 2 or more > > (non-overlapping) regions. These zones would be a bit like > > multiple selections. If you start drawing in one zone, you can't > > draw over another zone without releasing the mouse-button / > > lifting the pen (same effect as drawing outside of the current > > selection). > > > > Such a feature would remove the need for using layers and moving > > between them > > or constantly changing selections in cases where adjacent areas > > need sharp edges between them. > > > > Using layers would mean constant switching between them. Same for > > selections. Long mouse-ways in both cases. Zones, once setup > > could be left active for long durations. > > > > This has nothing to do with split-views, Sven, as the image is > > shown the same way, not in parts. You would just need marching > > ants or similar for the zone extents and the ability to hide > > them. > > > > If it's still unclear, I'll provide graphical explanation. > > > > > > http://bugzilla.gnome.org/show_bug.cgi?id=397237 > > This would be wonderfully useful to me for CGing. You would need to > be able to define zones per-layer - It would only greatly reduce > the need for layers, not obviate them completely, for example when > I'm making an alternate coloration or remake of something, I like > to paste it over the original as a new layer, and use the enter key > to toggle it's visibility. > > I think you would have to use saved selections rather than layers, > to avoid the strange 'sibling-effects-sibling' behaviour (ie one > layer is real, other is zonemasks, but they're both in the same > list). If you specified a rule such as 'zonemasks are always the > layer immediately above the layer they apply to, if the layer has > zonemasks at all' you could probably manage layer based zonemasks > (of course they're better cause they can be in color.) ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On Wed, Jan 17, 2007 at 01:26:07PM +0100, Thorsten Wilms wrote: > > # The goal: > Draw on several areas of an image while maintaining sharp edges > around each of them (in many cases they will touch, so before I > talked about edges between them). > With the least amount of interruption! > # Drawing zones > # Stop lines Thinking some more about this, a "switch to highest in the stack layer with non-zero alpha at pointer location", option, triggered on button/pen-down before drawing is actually executed could do the trick while been least intrusive in GIMP. It would be a bit like the Pick_a_layer_or_guide option of the Move tool, allthough it might be of advantage to stay on the last painted on layer, not jumping back to the previous layer selection. -- Thorsten Wilms Thorwil's Creature Illustrations: http://www.printfection.com/thorwil ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On Wed, 17 Jan 2007 16:00:00 +0100, Thorsten Wilms <[EMAIL PROTECTED]> wrote: > On Wed, Jan 17, 2007 at 06:36:27AM -0800, Saul Goode wrote: > > If the only difference is whether a mouse-click is used on the canvas or > > a keystroke/menu/widget action is used to invert the selection, I > > suspect you shall have a difficult time convincing the GIMP developers > > to add your concept of a "drawing zone" to the core and have it honored > > by all the paint tools. > > No. First it's important that it's not an additional mouse-click. > Not even a click, just where the button/pen-down happens if you > start to draw. Keep in mind that what you are suggesting is a rather specialized use case. Even if the concept is interesting and would save you some time, it has a cost for all other GIMP users: menu clutter, additional stuff in the UI, etc. And of course there is also a cost for the developers, not only in implementing the feature but also in maintaining it and fixing bug reports releated to this new feature and its interaction with other current or future GIMP features. So unless you can convince the developers that the concept of "Drawing Zones" would be useful for a significant percentage of GIMP users, you have to balance the advantages of that new feature with the (minor) disadvantages that it would cause to all other users. It looks like the best solution in your case would be to use some keyboard shortcuts for switching quickly between layers: this would have a small cost for you without costing anything to anybody else. > If you work 10 hours + on an image, every click more or less counts. > Especialy not having to think about any other operation but drawing > is a big one. On the other hand, if you work 10+ hours on an image and if you do that on a regular basis, then you could consider using some additional input device (e.g. MIDI controller) so that you can bind some of its controls to GIMP actions. I haven't checked what is really possible with cheap MIDI controllers, but you might be able to use a pedal or something like that and switch layers with your feet. :-) -Raphaël ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On Wed, Jan 17, 2007 at 06:36:27AM -0800, Saul Goode wrote: > > Lets try another description: > > Drawing zones would be like 2 or more non-overlapping selections > > that are active at the same time. Which one is applied to a drawing > > operation is determined by where the mouse/pen-down happens. > > If the only difference is whether a mouse-click is used on the canvas or > a keystroke/menu/widget action is used to invert the selection, I > suspect you shall have a difficult time convincing the GIMP developers > to add your concept of a "drawing zone" to the core and have it honored > by all the paint tools. No. First it's important that it's not an additional mouse-click. Not even a click, just where the button/pen-down happens if you start to draw. If you work 10 hours + on an image, every click more or less counts. Especialy not having to think about any other operation but drawing is a big one. Then it's not simply inversion, as there could be more than 2 zones. -- Thorsten Wilms Thorwil's Creature Illustrations: http://www.printfection.com/thorwil ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
> Sorry, no. I don't see the benefit over switching between layers. > #1: A selection does not overlap its inverse. #2: There is no need to keep track of which layers are associated with each other (and for "switching between layers", presumably they would need to be adjacent in the layerstack). #3: Switching between "drawing zones" (i.e., inverting the selection) uses the same keystroke/action regardless of which zone is active. (For layers, the user would have to remember whether to activate the layer above or below.) #4: The Layers window is not cluttered with "zone layers". > Lets try another description: > Drawing zones would be like 2 or more non-overlapping selections > that are active at the same time. Which one is applied to a drawing > operation is determined by where the mouse/pen-down happens. If the only difference is whether a mouse-click is used on the canvas or a keystroke/menu/widget action is used to invert the selection, I suspect you shall have a difficult time convincing the GIMP developers to add your concept of a "drawing zone" to the core and have it honored by all the paint tools. "It is amazing what you can accomplish if you do not care who gets the credit." -- Harry S. Truman ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On Wed, Jan 17, 2007 at 01:18:35AM -0800, Saul Goode wrote: > > If I am understanding you correctly, these scripts should be helpful to > you in your workflow. You would still have to manually invert the > selection; but I would point out that the Select menu can torn off so > that "Select->Invert" is just a mouse-click away. Sorry, no. I don't see the benefit over switching between layers. Lets try another description: Drawing zones would be like 2 or more non-overlapping selections that are active at the same time. Which one is applied to a drawing operation is determined by where the mouse/pen-down happens. Implicit area selection (to not say Selection selection) :) -- Thorsten Wilms Thorwil's Creature Illustrations: http://www.printfection.com/thorwil ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On Wed, Jan 17, 2007 at 08:52:48AM +0100, Sven Neumann wrote: > > I start to realize what you are asking for now. But, instead of > suggesting a solution, could you perhaps try to explain where the > problems are when you try to use the currently available features to > implement your workflow? You should be able to do this with layers or > selections. If that doesn't work for you, then perhaps there's something > that we need to change about how layers and/or selections are handled. I > don't think that we need to introduce a completely new feature. # The goal: Draw on several areas of an image while maintaining sharp edges around each of them (in many cases they will touch, so before I talked about edges between them). With the least amount of interruption! # Motivation You often have parts of an image that need the same treatment, but are clearly divided (like hand and body on my example image). You draw with the same base colour, draw light and shadow, texturing ... all best done in one go. [Drawing from scratch might not be seen as typical use of GIMP, but I know I'm not the only one and the closest commercial counterpart, Photoshop is used for this alot, even though there's Painter. Check for example http://forums.cgsociety.org/forumdisplay.php?s=f49edc03bcbdb53f623009e1366edda9&f=133] # Layers Using layers, you will likely end up with one layer per area. You need to switch between them. Just today I took notice it can be done with Page Up/Down, layer name appears in status bar. If you don't use the shortcuts, you need the layers dialog, taking away space from the drawing area. If you use them, it's just a keypress, but you have to take care in which layer you end up (drawing something on the wrong layer is a mistake i make often enough, even usuing the layers dialog). # Selections Loading selections to me means having to change between layer and channel tabs and a lot of mouse movement away from the canvas. This already makes me use layers with locked alpha everywhere I can. Only with exactly 2 areas, one could use inverse selection. # Drawing zones I think drawing zones would have to be organised in sets. The zones of a set would always cover a full rectangle like layers do. Inside a set you would add/delete zones and select the zone you want to edit. Editing could then happen with the current selection tools. Masking would require 1 colour for each zone. I admit this sounds a bit complicated. Now for the nice part: once setup, you just draw! If you move the pointer outside the zone you started drawing in, nothing happens (just like painting outside a selection). You don't have to hit a single button, but get to focus on drawing completely. # Stop lines My initial idea was to have just lines (non-closed paths), which you can't draw past. So they act like a selection boundary, but are not closed. You could even draw all around them, something that might be helpful on drawing armpits. I then thought it might be hard to check for this, so closed regions/zones might be easier. The management of stop lines might be more simple, though. -- Thorsten Wilms Thorwil's Creature Illustrations: http://www.printfection.com/thorwil ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On Tue, 2007-01-16 at 22:06 +0100, Thorsten Wilms wrote: > My proposal is about an alternative to using either layers > or saved selections to draw on areas of an image with sharp > edges between them. > If I might offer a possible work-around. I have written a some scripts which permit you to save a selection so that it is associated with a specific layer. You can then, at a later date, reload that selection while the layer is active. The Script-fu (available at http://flashingtwelve.brickfilms.com/GIMP/Scripts/zonemasks.scm) adds three commands to the Layers window's menu (the one you see when you right-click on a layer preview. They are (I used Simon's term, "zonemask"): * Save zonemask - Saves the current selection to a channel that has the same name as the layer. If a channel already exists with that name, it is replaced. * Load zonemask - If a channel exists with the same name as the layer, it is loaded into the selection. If there is no selection associated with the layer, the selection is cleared (ie, Select None) * Remove all zonemasks - Removes any channels that are zonemasks. It does not remove other channels. I currently attach a parasite (named "zone-mask") to the channel and assign it the value of the tattoo of the associated layer. The parasites permit "Remove all zonemasks" to ignore other channels. The value of the parasite is presently unused but in the future might permit multiple selections to be associated with a layer. If I am understanding you correctly, these scripts should be helpful to you in your workflow. You would still have to manually invert the selection; but I would point out that the Select menu can torn off so that "Select->Invert" is just a mouse-click away. If nothing else, perhaps you could test the scripts and tell me if whether I understood your workflow. A final caveat on the scripts: I do not have a stable install (version 2.2) of the GIMP available right now. I tested the scripts on the development version (2.3.13) and I tried to account for differences in coding required. If you have a recent development version (2.3.13) available, it would be best if you used that. "It is amazing what you can accomplish if you do not care who gets the credit." -- Harry S. Truman ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
Hi, On Tue, 2007-01-16 at 22:06 +0100, Thorsten Wilms wrote: > My proposal is about an alternative to using either layers > or saved selections to draw on areas of an image with sharp > edges between them. I start to realize what you are asking for now. But, instead of suggesting a solution, could you perhaps try to explain where the problems are when you try to use the currently available features to implement your workflow? You should be able to do this with layers or selections. If that doesn't work for you, then perhaps there's something that we need to change about how layers and/or selections are handled. I don't think that we need to introduce a completely new feature. This is one of the main reasons why I ask for enhancement requests to be discussed here first. I would like users to explain their goals and the way they would like to work. Users are good at pointing out problems with our user interface but they tend to suggest features that would be difficult to implement and to maintain. Quite often there is a simpler solution that fits in better with the current feature set and codebase. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
Him On Tue, 2007-01-16 at 22:06 +0100, Thorsten Wilms wrote: > My proposal is about an alternative to using either layers > or saved selections to draw on areas of an image with sharp > edges between them. > > http://bugzilla.gnome.org/attachment.cgi?id=80388 > > Shows a typical case, ignoring the background we have > two such areas: body and hand. > > Drawing zones are about dividing the image into 2 or more > (non-overlapping) regions. These zones would be a bit like multiple > selections. If you start drawing in one zone, you can't draw over > another zone without releasing the mouse-button / lifting the pen (same > effect as drawing outside of the current selection). Sorry, I don't understand it. No clue, really. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
Hi, On Wed, 2007-01-17 at 12:19 +1030, David Gowers wrote: > Also consider reopening the bug report -- you can do this since you're > the reporter, and as Sven resolved it WONTFIX under a huge > misapprehension of it, I recommend doing so. It may influence the > volume of discussion on it here. David, new features should always be discussed here before a bug report is opened at all. That ensures that the bug reports make sense and that there's a consensus among the GIMP developers about if and how it should be implemented. Filing this request first in bugzilla was a mistake. Please don't encourage people to redo their mistakes. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
Also consider reopening the bug report -- you can do this since you're the reporter, and as Sven resolved it WONTFIX under a huge misapprehension of it, I recommend doing so. It may influence the volume of discussion on it here. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Drawing zones
On 1/17/07, Thorsten Wilms <[EMAIL PROTECTED]> wrote: Hi! So I was asked to suggest new features on the mailing-list and only file bug report after they have been discussed there ... and it seems theres a misunderstanding to be resolved and i wouldn't mind more exposure for this ... :) My proposal is about an alternative to using either layers or saved selections to draw on areas of an image with sharp edges between them. http://bugzilla.gnome.org/attachment.cgi?id=80388 Shows a typical case, ignoring the background we have two such areas: body and hand. Drawing zones are about dividing the image into 2 or more (non-overlapping) regions. These zones would be a bit like multiple selections. If you start drawing in one zone, you can't draw over another zone without releasing the mouse-button / lifting the pen (same effect as drawing outside of the current selection). Such a feature would remove the need for using layers and moving between them or constantly changing selections in cases where adjacent areas need sharp edges between them. Using layers would mean constant switching between them. Same for selections. Long mouse-ways in both cases. Zones, once setup could be left active for long durations. This has nothing to do with split-views, Sven, as the image is shown the same way, not in parts. You would just need marching ants or similar for the zone extents and the ability to hide them. If it's still unclear, I'll provide graphical explanation. http://bugzilla.gnome.org/show_bug.cgi?id=397237 This would be wonderfully useful to me for CGing. You would need to be able to define zones per-layer - It would only greatly reduce the need for layers, not obviate them completely, for example when I'm making an alternate coloration or remake of something, I like to paste it over the original as a new layer, and use the enter key to toggle it's visibility. I think you would have to use saved selections rather than layers, to avoid the strange 'sibling-effects-sibling' behaviour (ie one layer is real, other is zonemasks, but they're both in the same list). If you specified a rule such as 'zonemasks are always the layer immediately above the layer they apply to, if the layer has zonemasks at all' you could probably manage layer based zonemasks (of course they're better cause they can be in color.) ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Drawing zones
Hi! So I was asked to suggest new features on the mailing-list and only file bug report after they have been discussed there ... and it seems theres a misunderstanding to be resolved and i wouldn't mind more exposure for this ... :) My proposal is about an alternative to using either layers or saved selections to draw on areas of an image with sharp edges between them. http://bugzilla.gnome.org/attachment.cgi?id=80388 Shows a typical case, ignoring the background we have two such areas: body and hand. Drawing zones are about dividing the image into 2 or more (non-overlapping) regions. These zones would be a bit like multiple selections. If you start drawing in one zone, you can't draw over another zone without releasing the mouse-button / lifting the pen (same effect as drawing outside of the current selection). Such a feature would remove the need for using layers and moving between them or constantly changing selections in cases where adjacent areas need sharp edges between them. Using layers would mean constant switching between them. Same for selections. Long mouse-ways in both cases. Zones, once setup could be left active for long durations. This has nothing to do with split-views, Sven, as the image is shown the same way, not in parts. You would just need marching ants or similar for the zone extents and the ability to hide them. If it's still unclear, I'll provide graphical explanation. http://bugzilla.gnome.org/show_bug.cgi?id=397237 -- Thorsten Wilms Thorwil's Creature Illustrations: http://www.printfection.com/thorwil ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer