[DONE] George : Select layers with color index

This section is dedicated to the feature & improvement requests (be sure what you are asking does not exist yet in TVPaint Animation ;) )
Post Reply
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

[DONE] George : Select layers with color index

Post by Mads Juul »

tv_layercolor select color_index
tv_layercolor unselect color_index

-mads
Last edited by Mads Juul on 14 Nov 2014, 08:16, edited 1 time in total.
User avatar
Hervé
Site Admin
Posts: 3490
Joined: 08 Feb 2006, 17:00
Location: Metz France
Contact:

Re: Select layers with color index with George

Post by Hervé »

tv_layergetcolor LayerID
tv_layersetcolor LayerID ColorIdx
Hervé ADAM, TVPaint Team
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: Select layers with color index with George

Post by Mads Juul »

Is there a George command for Key: Layer: Select Current Layer ?
-Mads
User avatar
Hervé
Site Admin
Posts: 3490
Joined: 08 Feb 2006, 17:00
Location: Metz France
Contact:

Re: Select layers with color index with George

Post by Hervé »

madsjuul wrote:Is there a George command for Key: Layer: Select Current Layer ?
-Mads
No
Hervé ADAM, TVPaint Team
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: Select layers with color index with George

Post by Mads Juul »

Hervé wrote: tv_layergetcolor LayerID
tv_layersetcolor LayerID ColorIdx
??
isn't it

Code: Select all

tv_layercolor get layer_id (return color index of the layer id)
tv_layercolor set layer_id color_index
I think I haven't explained the Feature request properly.

I would like to make a layer Selection containing all the layers with the same Color Index.
It's possible in the popup menu when you right click the 13 colors in the buttom of the Layer panel
it says
- 'Select the layers of this color'
and
- 'unselect the layers of this color'

I would like to make a script so I with one shortcut can make a layer selection containg the layers with the color of the current layer. so I can make An instance handle drag on these layers.
-Mads
User avatar
Hervé
Site Admin
Posts: 3490
Joined: 08 Feb 2006, 17:00
Location: Metz France
Contact:

Re: Select layers with color index with George

Post by Hervé »

here is all options in the cmd:

Code: Select all

	* tv_layercolor get layer_id (return color index of the layer id)
	* tv_layercolor set layer_id color_index
	* tv_layercolor lock color_index
	* tv_layercolor unlock color_index
	* tv_layercolor show display color_index
	* tv_layercolor show timeline color_index
	* tv_layercolor hide display color_index
	* tv_layercolor hide timeline color_index
	* tv_layercolor [de]select color_index
Here is the script to select all layers with the same colors

Code: Select all

tv_layercolor get 0
color_idx = result
tv_layercolor select color_idx
Hervé ADAM, TVPaint Team
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: Select layers with color index with George

Post by Mads Juul »

Hervé

Thank You Hervé
I missed the slect cmd.

To make the script work as I would like I hav to make a deselect firs

Code: Select all

PARAM None
i=0
WHILE i < 13
	tv_layercolor deselect i
	i=i+1
END
tv_layercolor get 0
color_idx = result
tv_layercolor select color_idx
:_)mads
User avatar
ZigOtto
Posts: 4102
Joined: 17 Feb 2006, 22:50
Location: south-Petazonia

Re: Select layers with color index with George

Post by ZigOtto »

thanks Mads !
the preliminar "deselect all" part was missing me too.
8)
Post Reply