Re: Export looped clip
Posted: 16 Jun 2021, 13:17
TVPaint boards for technical support, requests and discussions about animation.
http://tvpaint.org/forum/
Code: Select all
// Script to set layer length to repeat for a set number of loops
tv_LayerInfo [tv_layercurrentid]
PARSE Result layerDisplay layerPosition layerOpacity layerName layerType layerFirstFrame layerLastFrame layerPrelighttable layerPostlighttable selectable editable stencil
Anim_Offset = layerFirstFrame - 1
Anim_Length = layerLastFrame - Anim_Offset
Loop_Count = 1
Loop_Min = 1
Loop_Max = 10
Loop_Title = "How many Loop?"
tv_reqnum Loop_Count Loop_Min Loop_Max Loop_Title
PARSE Result Loop_Count Loop_Min Loop_Max Loop_Title
IF ( CMP( Result, "cancel") == 1 )
exit
END
Loop_Markout = (Anim_Length * Loop_Count) + Anim_Offset
tv_markin [0] ["set"]
tv_markout [Loop_Markout] ["set"]
tv_layerpostbehavior [tv_layercurrentid] ["repeat"]