Page 1 of 1

Auto Pick Color

Posted: 04 Sep 2015, 08:55
by Peter Wassink
with the paintbucket i want to pick colors from a layer below while filing with a source above.



Now you can only pick colors from the previous frame. (is that correct?)
a problem with that is that also picks up lighttable colors! BUG!
i activated the Lightable to be able to distinguish what parts of the source are already colored.


it would be very nice if you could pick directly from another layer at the same framenumber.

Re: Auto Pick Color

Posted: 04 Sep 2015, 11:59
by Fabrice
a problem with that is that also picks up lighttable colors! BUG!
I don't think it's a bug. If the "autopick color" box is checked it's the normal (and very handy) behavior.

Re: Auto Pick Color

Posted: 04 Sep 2015, 12:28
by Peter Wassink
in what cases is it handy to pick the lighttable color?
And is it true you cannot pick from the current frame?

Re: Auto Pick Color

Posted: 04 Sep 2015, 12:35
by Fabrice
Peter Wassink wrote:in what cases is it handy to pick the lighttable color?
here : http://www.tvpaint.com/doc/tvp11/index. ... pick-color" onclick="window.open(this.href);return false;

Re: Auto Pick Color

Posted: 04 Sep 2015, 13:06
by Peter Wassink
ah that! yes off course this is very usefull.

what i saw happening (and i can't replicate or explain how it could have happenend)
is that the actual lightable color was picked up and mixed in with the color that was painted.

what i need is a color reference layer on the bottom, to autopick my colors from
so i can color an abstract lineanimation on top in a very fast way.
just as you can color an animation very fast like in your link.

the effect is a bit like a filter, but its a filter we don't have in tvpaint so thats why i wanted to do it by hand... only picking from another layer is not possible :cry:

Re: Auto Pick Color

Posted: 04 Sep 2015, 13:27
by Elodie
Actually, you would like to get the Auto Pick depending on Source in Shape Settings ?

Re: Auto Pick Color

Posted: 04 Sep 2015, 13:48
by Svengali
Peter,

Here's a short script you can embed in a button, then assign the button to a shortcut, which, I think does what you want?

Code: Select all

tv_GetMouse
parse result x y 
tv_GetPixelDisplay x y
parse result Dr Dg Db Da
tv_SetAPen Dr Dg Db
tv_RectFill 20 20 80 80   // remove this line
To use, just point to the pixel you want to read, and press your shortcut key...

First it reads the current x,y cursor position, then it uses tv_GetPixelDisplay at the cursor position to read the combined color for all layers so no matter what layer you are on, you can get the color of a pixel on the bottom layer - the last command draws a rectangle of the captured color on the current layer (just meant to show you what you are getting). You'll be able to use the color captured in the APen to fill your source on the current layer.

You could also use the tv_GetPixelLayer command for a similar result. But your script would need to know (or somehow detect) which layer your source color swatches were on.

Sven

Re: Auto Pick Color

Posted: 04 Sep 2015, 13:52
by Peter Wassink
Elodie wrote:Actually, you would like to get the Auto Pick depending on Source in Shape Settings ?
yes those options sound like a good idea, something like this maybe:
autopick.png
autopick.png (13.66 KiB) Viewed 17897 times

Re: Auto Pick Color

Posted: 04 Sep 2015, 14:15
by Peter Wassink
Thanks Sven this is great!
i can work with this for now.

it would be great if this functionality would be added though.
Svengali wrote:Peter,

Here's a short script you can embed in a button, then assign the button to a shortcut, which, I think does what you want?

Code: Select all

tv_GetMouse
parse result x y 
tv_GetPixelDisplay x y
parse result Dr Dg Db Da
tv_SetAPen Dr Dg Db
tv_RectFill 20 20 80 80   // remove this line
To use, just point to the pixel you want to read, and press your shortcut key...

First it reads the current x,y cursor position, then it uses tv_GetPixelDisplay at the cursor position to read the combined color for all layers so no matter what layer you are on, you can get the color of a pixel on the bottom layer - the last command draws a rectangle of the captured color on the current layer (just meant to show you what you are getting). You'll be able to use the color captured in the APen to fill your source on the current layer.

You could also use the tv_GetPixelLayer command for a similar result. But your script would need to know (or somehow detect) which layer your source color swatches were on.

Sven