Page 1 of 1

keyboard shortcut next group (colour)

Posted: 21 Apr 2021, 09:18
by Joost
Hi!

Is there a way to make a keyboard shortcut for creating "next a colour label" (of "group" as they are called officially).

What I mean:
I create a layer with the "default" group color, then I want to hit this keyboard shortcut to make the layer the "group A" color, and hit it again to make it "group B", and so on.


Any suggestion?


Thanks!

Re: keyboard shortcut next group (colour)

Posted: 21 Apr 2021, 09:55
by Joost
Ooh and another keyboard shortcut I'm looking for:

Is there a way to create a keyboard shortcut for turning off the light table for EVERY layer (at the same time)?
(so the "sun" icon is turned off for all layers)

Thanks!

Re: keyboard shortcut next group (colour)

Posted: 21 Apr 2021, 20:40
by Svengali
George scripting...
KILL LIGHTTABLE IN ALL LAYERS:
Loops through all layers, lights out. cut this script and paste it in an embedded George Script button

Code: Select all

LayerID = 0	
Counter = 0	
While CMP(LayerID,"none") == 0	
	   tv_LayerGetID Counter	
   	LayerID = result
    	tv_LayerDisplay LayerID LIGHTTABLE OFF
	    	Counter = Counter + 1
END
COLORGROUPS:
13 colorindex numbers, so you need to step through the colorgroups for the current layer.
cut this script and paste it in an embedded George Script button. Each tap goes to next higher index, then loops back to zero index.

Code: Select all

tv_GetCurrentID
LayerID = result
tv_LayerColor GET  LayerID 0
ColorIndex = result
NewColorIndex = ColorIndex + 1
IF NewColorIndex > 12
  NewColorIndex = 0
END
tv_LayerColor SET LayerId NewColorIndex

Re: keyboard shortcut next group (colour)

Posted: 22 Apr 2021, 10:31
by Joost
You are a genius! :D
I will check it out tomorrow!

Re: keyboard shortcut next group (colour)

Posted: 23 Apr 2021, 08:11
by Joost
They work really well.
Thanks a lot!