Auto Pick Color

This section is dedicated to the feature & improvement requests (be sure what you are asking does not exist yet in TVPaint Animation ;) )
Post Reply
User avatar
Peter Wassink
Posts: 4283
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Auto Pick Color

Post 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.
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
Fabrice
Posts: 10077
Joined: 17 Jul 2007, 15:00
Contact:

Re: Auto Pick Color

Post 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.
Fabrice Debarge
User avatar
Peter Wassink
Posts: 4283
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: Auto Pick Color

Post 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?
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
Fabrice
Posts: 10077
Joined: 17 Jul 2007, 15:00
Contact:

Re: Auto Pick Color

Post 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;
Fabrice Debarge
User avatar
Peter Wassink
Posts: 4283
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: Auto Pick Color

Post 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:
Last edited by Peter Wassink on 04 Sep 2015, 13:29, edited 1 time in total.
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
Elodie
Posts: 13913
Joined: 06 Jan 2009, 09:53
Location: Metz

Re: Auto Pick Color

Post by Elodie »

Actually, you would like to get the Auto Pick depending on Source in Shape Settings ?
Svengali
Posts: 1552
Joined: 28 Dec 2006, 10:08

Re: Auto Pick Color

Post 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
Last edited by Svengali on 04 Sep 2015, 13:53, edited 1 time in total.
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
User avatar
Peter Wassink
Posts: 4283
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: Auto Pick Color

Post 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 17231 times
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
Peter Wassink
Posts: 4283
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: Auto Pick Color

Post 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
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
Post Reply