Split Layer Topic is solved

A forum dedicated to George scripting questions
Post Reply
scribbly
Posts: 14
Joined: 19 May 2011, 09:25

Split Layer

Post by scribbly »

I've looked all the way through the George Wiki but I can't see a command to Split a layer.

Surely there must be one? Or is there another way to achieve the same result?

Thanks
TVPaint: 10 Pro 10.5.7-64
Windows: 7-64 bit
User avatar
Paul Fierlinger
Posts: 8100
Joined: 03 May 2008, 12:05
Location: Pennsylvania USA
Contact:

Re: Split Layer

Post by Paul Fierlinger »

It's in the Animator Panel now.
Paul
http://www.slocumfilm.com
Desktop PC Win10-Pro -64 bit OS; 32.0 GB RAM
Processor: i7-2600 CPU@3.40GHz
AMD FirePro V7900; Intuos4 Wacom tablet
scribbly
Posts: 14
Joined: 19 May 2011, 09:25

Re: Split Layer

Post by scribbly »

Ah, yes... but is it callable from a script? I want to do other things with the same function...
TVPaint: 10 Pro 10.5.7-64
Windows: 7-64 bit
User avatar
NathanOtano
Posts: 1208
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: Split Layer

Post by NathanOtano »

Also need to split a layer with george :)
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.
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: Split Layer

Post by Svengali »

GEORGE doesn't have a command to split layers. You have to build a script to do it. Here's an example...
LayerSplitExample.tvpx
(57.5 KiB) Downloaded 188 times
And here's the script:
Spoiler : :

Code: Select all

// LayerSplit.grg
// Svengali © 2018
// (April) 2018 - ver .0

// on layer to be split, set cursor on what will be the first frame in new layer
// note: new split layer is globally shifted to align one frame past last frame of original layer

Param none
ScriptName = "LayerSplit"

tv_UndoOpenStack									// suspend stack
tv_LayerCurrentID									// get ID for layer to be split
LayerID = result
tv_LayerGetImage									// get current frame
SplitFrame = result
tv_LayerInfo										// get layer name and last frame
parse result d d d LayerName d d LastFrame d
TotalFrames = LastFrame - SplitFrame + 1			// calculate number of frames to cut
tv_LayerSelect SplitFrame TotalFrames				// select frames to cut
LayerName1 = LayerName "-1"							// new name for original layer
LayerName2 = LayerName "-2"							// new name for new layer
tv_LayerCut											// cut selected frames
tv_LayerRename LayerID LayerName1 					// rename original layer
tv_LayerCreate LayerName2							// create new layer
NewLayerID = result									// get new layer's ID
tv_LayerSet NewLayerID								// select new layer
tv_LayerAnim										// make new layer anim layer
tv_LayerImage 1										// set cursor to first frame of new layer
tv_LayerPaste										// paste cut frames into new layer
tv_LayerSelect 0 1									// select first (blank) frame
tv_LayerCut											// delete blank frame
tv_LayerShift NewLayerID SplitFrame					// shift new layer start frame = global SplitFrame
tv_LayerSet LayerID									// reselect original layer
tv_UndoCloseStack									// restart undo stack
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
User avatar
NathanOtano
Posts: 1208
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: Split Layer

Post by NathanOtano »

Ah yes! Was thinking about that, thanks for the clever script!
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.
Post Reply