Opened 8 years ago
Last modified 2 years ago
#15 assigned enhancement
One-click contiguous brush grab
Reported by: | finticemo | Owned by: | PulkoMandy |
---|---|---|---|
Priority: | major | Milestone: | 2.9 |
Component: | GrafX2 | Version: | 2.4 |
Keywords: | Cc: |
Description
In my experience it is very common to want to grab a single-color contiguous region for transforming and stamping.
If possible, it would be good to have a way to do this in one click rather than having to create a detailed polygon to extract it.
As I imagine it, it would work exactly like floodfill, except that it would generate a mask to grab a brush with, rather than painting pixels onto the image.
Perhaps it could replace the current Right Click function on the 'Lasso' half of the brush grabbing button -- which seems to be redundant with the Right Click function on the other half of the brush grabbing button.
Change History (11)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
I have a script for picking up a brush under the mousepointer. If the single color is important it could easily be modified to just flood on the color under the mousepointer.
You can find it in the ToolBox key-dir: http://goto.glocalnet.net/axe/toolbox13.zip
follow-up: 5 comment:3 by , 8 years ago
@annassar : Oh, you're Dawnbringer?
Thanks for the script pointer -- MagicBrushGrab, right? -- I'll check it out. I do have to say though, that because the slots to keybind scripts to are limited to 9, I'm hesitant to keybind scripts for really frequent functions.
comment:4 by , 8 years ago
Type: | defect → enhancement |
---|
comment:5 by , 8 years ago
Yeah, I'm DB :) So I got around to take a look at this and fixed a script for picking up the color-area under the mousepointer. It scans in all eight directions so it can flood diagonal pixels: http://hem.bredband.net/ricfha/script/bru_db_ColorAreaGrab.lua
I've got a related script (bru_db_ExtractPenColor.lua) that will strip all colors but the pencolor from a brush, it's a very short piece of code:
cf = getforecolor() cb = getbackcolor() q = {} q[true] = cf q[false] = cb w, h = getbrushsize() for y = 0, h - 1, 1 do for x = 0, w - 1, 1 do putbrushpixel(x, y, q[(getbrushbackuppixel(x,y) == cf)]); end end
comment:6 by , 5 years ago
Milestone: | 2.5 → 2.6 |
---|
comment:7 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:8 by , 4 years ago
If that feature is implemented with a lua script, I think we can close the issue.
comment:10 by , 3 years ago
Milestone: | 2.7 → 2.8 |
---|
comment:11 by , 2 years ago
Milestone: | 2.8 → 2.9 |
---|
EDIT: After some more careful checking, it seems that the 'Restore' function on the 'Lasso' part of the Brush Grab button does something different from the Restore function on the other half of the button.
It appears to restore a 1px brush.
However, this brush claims to be a grabbed brush and not the standard 1px brush, even though it works in all ways identically to the standard 1px brush. That part seems like a UI bug.
Perhaps doubly so, since the documentation for Lasso tool claims explicitly that the Brush Restore function is the 'same as above'.
So, I'm not sure what is going on there. But for now, I'll file it as a separate bug.