You can run your script directly or via the Poser Scripts menu or palette, all of which are described in Using PoserPython in your Poser Reference Manual.
You can also add commands in pose files that will call scripts to be run. For example, pose files have been able to call a Python script by adding the following line in the pose (PZ2) file:
runPythonScript "runtime:path:to:script.py"
runPythonScript has no arguments that can be passed to script.py, meaning that if you have five poses doing the same thing with only one difference, the developer has to make five copies of that script where only one line is different in each.
However, the runPythonScriptEx variant allows you to pass an argument to the script. For example, in script.py, the variable sys.argv[1] will be equal to "apples" as it would be if script.py were run from a command line. The syntax is as follows
© 2020-2021 Bondware, Inc. Last updated November 23, 2021