GEORGE : Layer selection Topic is solved
- schwarzgrau
- Posts: 1238
- Joined: 23 Jan 2012, 22:08
- Location: Offenbach / Germany
- Contact:
GEORGE : Layer selection
It would be pretty nice, if you could get the information which layers are selected in George. Also it could be pretty handy if you could select multiple layers in it.
Windows 11 22H2 / TVP 11.7.0 PRO WIBU / Cintiq 22HD
Windows 11 22H2 / TVP 11.7.0 PRO WIBU / Mobile Studio Pro 16" (2019)
Android 13 / TVP 11.7.0 / Galaxy Tab 7 FE
INSTAGRAM
Windows 11 22H2 / TVP 11.7.0 PRO WIBU / Mobile Studio Pro 16" (2019)
Android 13 / TVP 11.7.0 / Galaxy Tab 7 FE
Re: GEORGE : Layer selection
Bumping this request because some tools artists here have requested are entirely impossible without being able to detect multiple selected layers with George.
- NathanOtano
- Posts: 1208
- Joined: 01 Apr 2014, 07:07
- Location: Biarritz, France
- Contact:
Re: GEORGE : Layer selection
Can't you just run on all the layers with tv_layerinfo to check which are selected and put that in a list of variables to interact with? It's less handy that the command you want but such a command would be weird to use. How much variables would you get? How do you code that on your scripts?
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Re: GEORGE : Layer selection
I didn't realise LayerInfo had that info (in fact I didn't realise it could be called on a layer that wasn't the current layer). Thanks for the tip!
I suppose you have a point about how it'd be represented. I forget that George commands can only return simple data structures even though you can make tables/arrays yourself.
I suppose you have a point about how it'd be represented. I forget that George commands can only return simple data structures even though you can make tables/arrays yourself.
- NathanOtano
- Posts: 1208
- Joined: 01 Apr 2014, 07:07
- Location: Biarritz, France
- Contact:
Re: GEORGE : Layer selection
Nice
You can also create a function for the whole process in one command and share it here hehe
You can also create a function for the whole process in one command and share it here hehe
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Re: GEORGE : Layer selection
I have!
I'm sure there's improvements that could be made (like a better way to iterate over layers) but this does the job for me. Here's the function:
Also some sample usage:
I'm sure there's improvements that could be made (like a better way to iterate over layers) but this does the job for me. Here's the function:
Code: Select all
FUNCTION get_selected()
select_count = 0
FOR id = 1 to 10000
tv_LayerInfo id
PARSE result layerDisplay layerPosition layerOpacity layerName layerType layerStart layerEnd layerPrelighttable layerPostlighttable selected x
IF (CMP(selected,'1') == 1)
select_count = select_count + 1
selected[select_count] = id
END
END
return selected
END
Code: Select all
get_selected()
selected = result
FOR x = 1 to select_count
tv_warn "ID"selected[x]
END
- Hironori Takagi
- Posts: 313
- Joined: 14 May 2018, 10:15
- Location: Tokyo, Japan
- Contact:
Re: GEORGE : Layer selection
The layerselection item in tv_layerinfo is not listed on tvpaintwiki, but it is described in the TVPaint 11 Documentation published last year.
https://www.tvpaint.com/doc/tvpaint-ani ... _layerinfo
https://www.tvpaint.com/doc/tvpaint-ani ... _layerinfo
TVPaint 11.7.2(Nov 14 2023), Windows11 Pro, HP Spectre x360 Convertible 14-ea0xxx / TVPaint 11.7.1(Dec 22 2022) Mac OS 11.6, Apple MacBookPro M1 2020
- NathanOtano
- Posts: 1208
- Joined: 01 Apr 2014, 07:07
- Location: Biarritz, France
- Contact:
Re: GEORGE : Layer selection
Nice thanks
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.