Toggle Lighttable on multiple layers from the script Topic is solved

A forum dedicated to George scripting questions
Post Reply
MaciejGliwa
Posts: 7
Joined: 22 Mar 2018, 07:09

Toggle Lighttable on multiple layers from the script

Post by MaciejGliwa »

Hi Everyone!

I'm trying to create an action that will toggle lighttable mode on/off for specified layers. I know there is tv_layerDisplay command that has LightTable option in it but I don't know how to use it in the script. Can someone help me?
Basically I want to turn on/off onion skinning on layers numbered 2, 4 and 6 on my timeline.

Thanks a lot for the help!

Maciej
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: Toggle Lighttable on multiple layers from the script

Post by Svengali »

Here's a script to toggle Layer2 on and off. Layer 4 and 6 will work the same.

Code: Select all

tv_LayerGetID 2
LayerID2 = result
tv_LayerDisplay LayerID2 "lighttable" ON
parse result dummy LastLT
IF CMP(LastLT,"ON")
    tv_LayerDisplay LayerID2  "lighttable" OFF
END
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
MaciejGliwa
Posts: 7
Joined: 22 Mar 2018, 07:09

Re: Toggle Lighttable on multiple layers from the script

Post by MaciejGliwa »

Fantastic! Thank you so much!
Post Reply