Page 1 of 1

Shortcut to turn off Light table for all layers

Posted: 24 Apr 2013, 08:43
by Lukas
I'm trying to create a panel for easier access to my light table needs.

I've currently got this (see attachment)

Is there a way to insert actions like these into the buttons?

* turn off light table for all layers (for the '0-0' button)
* turn off light table for all layers and turn light table on for current layer (for all other buttons)

Re: Shortcut to turn off Light table for all layers

Posted: 13 May 2013, 07:39
by Lukas
...if anyone ever googles this, embed this code in a button to turn the light table off for all layers in a project:

Code: Select all

tv_LayerCurrentID
Beginlayer = result

layerRun = 1
layerPos = 0
WHILE layerRun	
	tv_LayerGetID layerPos	
	lid = result	
	IF CMP(lid,"NONE")==0		
		
		// START RUN ON LAYER 
               tv_LayerDisplay lid LightTable Off
		// END RUN ON LAYER
		layerPos = layerPos+1	
	ELSE		
		layerRun = 0
	END
END

tv_layerSet Beginlayer

Re: Shortcut to turn off Light table for all layers

Posted: 13 May 2013, 09:34
by Sewie
Thanks Lucas!
Do you suppose an shortcut can be made that toggles the lighttable like de "0" button in the Light Table Panel?
It's been a feature request for some time but has gotten snowed under like many other requests. Would be great if a script could solve that...

Re: Shortcut to turn off Light table for all layers

Posted: 13 May 2013, 09:38
by Lukas
That's exactly what I wanted it for myself Michael!

Here's a custom light panel I did for myself. I think the "0 | 0" button does exactly what you need, try it :)

(You might want to save your current light table settings to a bin, because it might override them)

Re: Shortcut to turn off Light table for all layers

Posted: 13 May 2013, 09:43
by Lukas
Oops, I think I misunderstood. Do you mean you want to toggle the "0" in the middle of the Light Table panel, and leave all the other settings like they are?

Re: Shortcut to turn off Light table for all layers

Posted: 13 May 2013, 09:47
by Sewie
Yes, that's what I mean. You would expect that option to be available in the Configure Keyboard Panel but for some reason it isn't.

Great panel though! Very clear buttons, I find.

Re: Shortcut to turn off Light table for all layers

Posted: 13 May 2013, 09:53
by Lukas
Sewie wrote:Yes, that's what I mean. You would expect that option to be available in the Configure Keyboard Panel but for some reason it isn't.

Great panel though! Very clear buttons, I find.
Beware, I always use the light table for a single layer, so when you press 1 of those buttons it turns the light table one for the current layer and switches it off for all other layers.

I'm not sure if it's possible (for me at least) to toggle the middle "0" with a script. It would be possible to toggle the density from 100% to 0% with a script I think, would that work for you?

Re: Shortcut to turn off Light table for all layers

Posted: 13 May 2013, 09:58
by Sewie
It might if it leaves other Light Table setting intact...

Re: Shortcut to turn off Light table for all layers

Posted: 13 May 2013, 10:11
by Lukas
Sewie wrote:It might if it leaves other Light Table setting intact...
Try to embed this in a button:

Code: Select all

tv_LightTableMode
LTsettings = result
PARSE LTsettings var1 var2 var3 var4 var5 var6 var7 LTdensity var9
IF (LTdensity > 0)
tv_LightTableMode var1 var2 var3 var4 var5 var6 var7 0 var9
ELSE
tv_LightTableMode var1 var2 var3 var4 var5 var6 var7 100 var9
END

Re: Shortcut to turn off Light table for all layers

Posted: 13 May 2013, 10:52
by Sewie
That's it! Thanks a lot, Lukas.
I've set the opacity to 60% at the end and it's just perfect.

Re: Shortcut to turn off Light table for all layers

Posted: 13 May 2013, 11:33
by Lukas
Happy to help :)