Support > Scripts > Convert to Vector (Centerline method)

ToonzScript Code

//Define the Input and Output folders

dir1 = "C:\\Toonz 7.0 stuff\\SCRIPT IMAGES IN\\";
dir2 = "C:\\Toonz 7.0 stuff\\SCRIPT IMAGES OUT\\";

//Set the parameters of the Centerline Vector Conversion

v = new CenterlineVectorizer();
v.threshold = 8;
v.accuracy = 10;
v.despeckling = 5;
v.maxThickness = 1000;
v.thicknessCalibration = 100;
v.preservePaintedAreas = false;
v.addBorder = true;

//Create a new level (a) and load the file name.tlv

a = new Level().load(dir1+"name.tlv");
print("loaded\n",a);

//Convert to vector the a level and save it as vectorized.pli

c = v.vectorize(a).save(dir2 + "vectorized.pli");

print("Converted to vector");

// Open a Flipbook window and view the saved level

view(c);