Python Node API
The Python Node API is the API for writing scripts with the Python Node or building export scripts for the Scene Export node.
Unlike Macros, these scripts can access the data that is flowing through the tracking tree.
Finally, Compound Nodes can also be used to group multiple nodes into a single entity and create simple customization GUI elements.
Python node scripts
We provide several example scripts which can be used as a starting point for customization:
animateCamera.py: animates the focal length and translation values for the first camera
filterTracks.py: averages tracker positions in neighbouring frames
hideBadPoints.py: hides trackers in frames where their residual error is larger than a specific value
scaleSurvey.py: scales trackers' survey positions by fixed factor
fetchMetaData.py: displays the media metadata in a clip
import2dt.py: creates tracker data for the primary camera from a text file with the format:
# Tracker name
"Tracker0001"
# Number of tracked frames
65
# Frame no, x position, y position, matching score
1 338.47 258.90 1.000
2 348.20 258.94 0.982
3 355.14 254.65 0.974
...
Export scripts
- XML.py: Exports camera information to XML.
Additional export scripts are also available to view in the application installation folder at /Applications/The Pixel Farm/PFTrack/exports/