GEORGE : tv_imageIsEmpty layerID iPosition

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
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

GEORGE : tv_imageIsEmpty layerID iPosition

Post by Mads Juul »

I would like a George command to quickly tell if an image is empty
Something like

Code: Select all

GEORGE : tv_imageIsEmpty layerID iPosition
RETURN bool 
1 if image(frame) is empty. 0 if something is drawn on the image
I know there is ways to do this with George for instance with tv_layercompareimage
But I would prefer a simpler solution that didn't inklude making new empty instances or layers
-Mads
User avatar
ZigOtto
Posts: 4102
Joined: 17 Feb 2006, 22:50
Location: south-Petazonia

Re: GEORGE : tv_imageIsEmpty layerID iPosition

Post by ZigOtto »

Mads Juul wrote:I would like a George command to quickly tell if an image is empty
Something like

Code: Select all

GEORGE : tv_imageIsEmpty layerID iPosition
RETURN bool 
1 if image(frame) is empty. 0 if something is drawn on the image
I know there is ways to do this with George for instance with tv_layercompareimage
But I would prefer a simpler solution that didn't inklude making new empty instances or layers
-Mads
I would prefer something like that ( "0" for "Empty" seems to me more intuitive) :

Code: Select all

GEORGE : tv_ImageContents layerID iPosition
RETURN bool 
- 0 if image(frame) is empty, 
- 1 if something is drawn on the image //pixel(s) with alpha > 0
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: GEORGE : tv_imageIsEmpty layerID iPosition

Post by Mads Juul »

ZigOtto wrote: I would prefer something like that ( "0" for "Empty" seems to me more intuitive) :
I agree.
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: GEORGE : tv_imageIsEmpty layerID iPosition

Post by Svengali »

A quick way is to capture the complete frame into a cutbrush, optimize the cutbrush and check its dimensions... of course you would probably want to somehow temporarily store the current cutbrush or animbrush image so you could restore it after the test.

Sven
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
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: GEORGE : tv_imageIsEmpty layerID iPosition

Post by Mads Juul »

Svengali wrote:A quick way is to capture the complete frame into a cutbrush, optimize the cutbrush and check its dimensions... of course you would probably want to somehow temporarily store the current cutbrush or animbrush image so you could restore it after the test.

Sven
I know but it is slow . I also have a different feature request for optaining the dimension of an image here
viewtopic.php?f=21&t=7762&p=73627&hilit ... und#p73627

In the thread I also briefly discusses the problems involving using the cutbrush method.
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: GEORGE : tv_imageIsEmpty layerID iPosition

Post by Svengali »

Mads Juul wrote:I know but it is slow . I also have a different feature request for obtaining the dimension of an image In the thread I also briefly discusses the problems involving using the cutbrush method.
Forgot dat. Having a George command for dimensions of a cutbrush and another that tests for a blank frame would be useful, especially inside a script that does other things as well.

so +1.

Sven
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
Post Reply