How can I manipulate the pencil points on the current drawing layer and frame? Scripting

Hi everyone,

I am currently trying to make a script that allows me to select a pencil “stroke” and the script will then draw a little point on the screen to indicate a percentage along that line/stroke.

The user will input values from 0 to 1 for as many points they want and the program will go though that list of user inputted percentages and make points along that line/stroke for each value. I already have a custom dialog box that allows for the user to do this.

QUESTION
All I need to know is how to get access to that selected pencil stroke and its raw data so I can do the curve math to find these points dynamically. In other words, how can I get the data that is later saved into a .tvg file in the project folder? The data that is in memory and gets saved out into a file when the user saves the project.

Thank you and I am happy to clarify anything that didn’t make sense!

SOLVED!!! Some people in the toon boom discord helped me out with this. They gave me a link to a page containing undocumented functions as a part of the Drawing global variable like query, geometry…etc.

Check it out: Toon Boom Drawing Documentation

Whats undocumented? This is part of Toon Boom’s Documentation.