The following sections will provide a brief overview of how to use PointKitPy in your own PointKit: Scan scripts.
When you run a script inside PointKit, the script is executed in a separate process. This means that you can’t directly interact with the script from the PointKit: Scan UI while it is running. However, stdout and stderr are captured and displayed in the UI.
In order to both pass data to the script and receive data from the script, you can use the POINTKIT_MESHES global variable. When a script is ran from within PointKit: Scan, this variable is populated with the mesh objects that are currently loaded in the mesh list.
Similarly, when the script is finished running, PointKit: Scan will read meshes from POINTKIT_MESHES - if it has been set and contains mesh objects - and display them in the mesh list, replacing any existing meshes. See the Examples section for more information on how to use this variable.