A way to know if an instance is empty?

A forum dedicated to George scripting questions
Post Reply
User avatar
NathanOtano
Posts: 1202
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

A way to know if an instance is empty?

Post by NathanOtano »

Yop

I searched on the forum but haven't found it.

Is there a way to know if an instance is empty with george?

Nathan

EDIT : Ok, found a way using a cutbrush, thanks Svengali : http://forum.tvpaint.com/viewtopic.php? ... box#p73598" onclick="window.open(this.href);return false;
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Svengali
Posts: 1553
Joined: 28 Dec 2006, 10:08

Re: A way to know if an instance is empty?

Post by Svengali »

Another strategy (probably faster and perhaps easier to incorporate in a looping test of all Instances on a layer) is to write a script around the following:

tv_layercompareimage LayerID1 ImagePosition1 LayerID2 ImagePosition2 //compares two specific layer/images to discover "sameness"

Which compares the Instance in question with a known blank Instance.

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
NathanOtano
Posts: 1202
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: A way to know if an instance is empty?

Post by NathanOtano »

Thanks!
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Elodie
Posts: 13912
Joined: 06 Jan 2009, 09:53
Location: Metz

Re: A way to know if an instance is empty?

Post by Elodie »

When using image mark panel, you can assign a colour for empty instances.
User avatar
NathanOtano
Posts: 1202
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: A way to know if an instance is empty?

Post by NathanOtano »

Elodie wrote:When using image mark panel, you can assign a colour for empty instances.
But i can't automatically asign an image mark to all empty instances, right? I have to detect which instance is empty before that.
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Elodie
Posts: 13912
Joined: 06 Jan 2009, 09:53
Location: Metz

Re: A way to know if an instance is empty?

Post by Elodie »

Yes it does ! :)
mark-empty-instances.png
mark-empty-instances.png (10.86 KiB) Viewed 1114 times
User avatar
NathanOtano
Posts: 1202
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: A way to know if an instance is empty?

Post by NathanOtano »

Haha awesome thanks. Never saw that
Is it available for keystrokes or George?
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Elodie
Posts: 13912
Joined: 06 Jan 2009, 09:53
Location: Metz

Re: A way to know if an instance is empty?

Post by Elodie »

I don't know :s
User avatar
Thierry
Site Admin
Posts: 2753
Joined: 07 Jan 2013, 08:28

Re: A way to know if an instance is empty?

Post by Thierry »

I don't think it exists in George.
And there's no shortcuts for this too.

Feature request ? :p
Si votre question a trouvé réponse, marquez votre sujet comme Résolu.
If your question has been answered, mark your topic as Solved.
User avatar
NathanOtano
Posts: 1202
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: A way to know if an instance is empty?

Post by NathanOtano »

I would prefer a simple "is empty" George comand (maybe related to the get bounding box request from MJ) rather than using image marks :)
I don't often need to mark every empty instance with a color (I would Irefer to MARK all used instances with a color in fact). I use image marks for a lot of other specific things when I animate.

So you want me to create another topic specifically for this keystroke request? :)
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Post Reply