GEORGE :Detect if layergroup is shown/hidden in timeline

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 :Detect if layergroup is shown/hidden in timeline

Post by Mads Juul »

Some function like

tv_layercolor state timeline color_index

that returns SHOW or HIDDEN

-Mads
Last edited by Mads Juul on 14 Nov 2014, 08:05, edited 1 time in total.
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: Detect with George if the layer color is shown or hidden

Post by Lukas »

Is this possible yet? I need this too. Can't find anything about it on the wiki.
  • Lukas Sketch Panel
  • TVPaint Pro 11.7.3
  • MacBook Pro 2018 macOS Ventura 13.4.1 + PC Windows 10
  • Wacom Cintiq 27QHD + Wacom Intuos4
  • YouTube.com/@ClubBaboo
  • YouTube.com/@FrameOrder
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: Detect with George if the layer color is shown or hidden

Post by Svengali »

mads,
I haven't played with the new layercolor commands yet but I suspect you could combine them with the layerinfo command to write a function that would loop through and poll all the layers, determine their states and remember their colors, to build a status array which could be called anytime you needed to determine layer-group visibility.

Once again, its a work-around but then what else is scripting there for if not to let you do what the programmers haven't yet included in the command set?

I'll have a look-see later today. :roll:

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
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: Detect with George if the layer color is shown or hidden

Post by Svengali »

mads,
From your request I'm assuming you want to use George scripting to read and/or adjust the status (Visible or Hidden) for each layer that matches a designated index color.

Here's what I think a script needs to do:

Establish a search color variable (index number, 0 - 13 )
Loop through all layers to compare each layer's index color to the search color variable.

use tv_LayerGetID position = to get each layer ID as you loop for the following tests and/or to change the visibility status of the found layers.

1. use tv_LayerColor Get LayerID to read each layer's color index number which you then compare to the search color variable.

for any layer which matches the search color variable,
2. use tv_LayerInfo LayerID to determine current status of layer (visible or hidden) and at the same time, read the layer's name.
3. use tv_LayerDisplay LayerID "ON|OFF" to turn the layer status visible or hidden... or toggle its status or ignore its status.

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
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: Detect with George if the layer color is shown or hidden

Post by Svengali »

I see. There's no George command to let you read the state of the layercolor check boxes. Need that. +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