change layer color code and lock it

A forum dedicated to George scripting questions
Post Reply
oferk
Posts: 94
Joined: 23 Jul 2011, 21:27

change layer color code and lock it

Post by oferk »

Hi,
Im looking to create a button in a custom panel, that changes the color-code of the current layer to red, and then locks it.
I tried playing with tv_layercolor set and stuff, but it didn't work.
Is it possible?

Thanks.
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18
Location: Viborg,Denmark
Contact:

Re: change layer color code and lock it

Post by Mads Juul »

Paste this code into "Embedded George Script" in an action
It sets the color of the currrent layer to the color index "13" the last color of the layers

Code: Select all

tv_layercolor set 0 13
tv_layerlock 0 ON
If you want another color change the colorindex(the number 13 in the first line of the code) to another number. Or edit the layer Colors by RMB the set layer color button on the layer. and press "Edit"
-Mads
Mads Juul
Storyboard Artist
blog: http://mjstoryboard.blogspot.dk/
Mail: mjstoryboard@gmail .com

Windows 10, 64 bit i7-4790 CPU 4.00 Hz,32 GB RAM, With TVP Animation 11 Pro (11.0.2-64bits)
2 Monitors 1920X1080 pixels + 1 Wacom Cintiq 21UX 2
oferk
Posts: 94
Joined: 23 Jul 2011, 21:27

Re: change layer color code and lock it

Post by oferk »

OK, I'll do that. Thanks a lot.
Post Reply