Layer Scripting Commands?

Please use this part to report bugs & errors, ask questions & "How to..."
Post Reply
SunWuKong
Posts: 9
Joined: 19 Aug 2006, 21:39

Layer Scripting Commands?

Post by SunWuKong »

Hello!

I'm looking to make some custom action buttons to toggle to visibility of individial layers. Does anyone know what the specific script commands are for that? I searched the forums but didn't see anything.

Thanks so much and have a great day!
User avatar
TVPaint
Site Admin
Posts: 711
Joined: 07 Feb 2006, 13:36

Post by TVPaint »

Hi Sun
Did you try the '=' keyboard shortcut ? it allows you to toggle between "Display All Layers" and "Display Selected Layers".

Have a great day too !

N.
SunWuKong
Posts: 9
Joined: 19 Aug 2006, 21:39

Post by SunWuKong »

Hmmm, That is close but I was really hoping to toggle layers on/off individually. Is there a way to do this scriptwise so I can setup actions/hotkeys for it? The function you mention doesn't really support the way I work with the layers.

Thanks!
User avatar
TVPaint
Site Admin
Posts: 711
Joined: 07 Feb 2006, 13:36

Post by TVPaint »

Hi Sun,
You can use the following script command : tv_layerdisplay 0 on
-> it enables the display of the current layer
and :
tv_layerdisplay 0 off
-> it disables the display of the current layer.

You can put these commands in buttons in a custom panel.

If you need a toggle with these commands, you'll need a little george program.
We will post one soon.
Regards,

N.
User avatar
TVPaint
Site Admin
Posts: 711
Joined: 07 Feb 2006, 13:36

Post by TVPaint »

Hi Sun,
With the 1.1 version, you can now create a custom button to toggle the visibility of each layer.
Create a new action, select the "Type a script command" option and type
tv_layerdisplay 0 TOGGLE

That's it, the new button will allows you to switch the visibility of the current layer.
SunWuKong
Posts: 9
Joined: 19 Aug 2006, 21:39

Post by SunWuKong »

That is great news! Did you guys add that because of my request? That's really above and beyond of you.

Thanks for being so thoughtful!

- Sun
User avatar
TVPaint
Site Admin
Posts: 711
Joined: 07 Feb 2006, 13:36

Post by TVPaint »

Hey Sun,
Well in fact we were surprised to figure out that it was not possible to toggle the layer visibility and furthermore that it has more sense if you can assign the function to a keystroke... it is done now and you contributed to it :wink:
Thank you Sun :)

Nicolas
Post Reply