add action: layer name and group color

Please use this part to report bugs & errors, ask questions & "How to..."
Post Reply
User avatar
furushil
Posts: 408
Joined: 12 Feb 2012, 21:02
Location: Berlin
Contact:

add action: layer name and group color

Post by furushil »

Hello,

I want to make a button which does the following:

1. duplicate selected layers
2. merge selected layers
3. rename layer to "merged"
4. set first group color (or a specific group color)

So far I have found "duplicate selected layers" and "merge selected" but I cannot find the last two functions.
Could someone tell me how I can add them?
button.png
button.png (16.41 KiB) Viewed 11940 times
MAC OS 12.6.2 - TVpaint 11.7.1 PRO 64bit, Wacom Intuos Pro
Elodie
Posts: 13912
Joined: 06 Jan 2009, 09:53
Location: Metz

Re: add action: layer name and group color

Post by Elodie »

It's in "Layer > Rename" :)
User avatar
furushil
Posts: 408
Joined: 12 Feb 2012, 21:02
Location: Berlin
Contact:

Re: add action: layer name and group color

Post by furushil »

Elodie wrote:It's in "Layer > Rename" :)
Thank you Elodie but if I choose that, I have to type in "merged" every time. Is there a way to have it named "merged" automatically.
It is probably very simple but I don't know anything about george script. I will try to look through the manual.
MAC OS 12.6.2 - TVpaint 11.7.1 PRO 64bit, Wacom Intuos Pro
Elodie
Posts: 13912
Joined: 06 Jan 2009, 09:53
Location: Metz

Re: add action: layer name and group color

Post by Elodie »

Oh ! ok. In that case, yes, you must use a script (but I cannot help :s)
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: add action: layer name and group color

Post by Mads Juul »

You can use this code for the two last

Choose "Embedded George Script" in the action and paste the following code

Code: Select all

tv_LayerRename 0 "merge"
tv_layercolor "set" 0 1
read about the two george functions here
http://wiki.tvpaint.fr/index.php?title=Tv_LayerRename" onclick="window.open(this.href);return false;
and here
http://wiki.tvpaint.fr/index.php?title=Tv_LayerColor" onclick="window.open(this.href);return false;
User avatar
furushil
Posts: 408
Joined: 12 Feb 2012, 21:02
Location: Berlin
Contact:

Re: add action: layer name and group color

Post by furushil »

That's it, thank you very much!
MAC OS 12.6.2 - TVpaint 11.7.1 PRO 64bit, Wacom Intuos Pro
Post Reply