The goal here is to allow Python scripts to have special installations so they will be properly setup and ready for users to use after unzipping them. This system should work no matter where the ZIP file was obtained from, or if it was installed through the Content Library or via the a "Install from ZIP Archive..." menu option. An ongoing goal is to provide security features so commercial Python scripts can verify the user actually purchased them through a store front and protect the script from easily being copied.
Python ZIP files must contain a unique top level folder, and all files must be inside this folder so it can be totally self contained for installing/uninstalling. This includes any README or LICENSE files, no exceptions! Example looking inside a ZIP file, there is only one folder:
Inside the folder, there must be one file called: install_python.json.
Inside it will be JSON data that looks something like:
{
// REMOVE all comments from this JSON before packaging
"name": "Poser Hello", // product name for python product
"scripts": [ // an array of menus to add for this product
{
"md5": "f57b7259b9b2d4c70dcb90991418f56d", // future security measure
"menu": "Poser Hello:Hello", // menu path where user will find the script
"script": "hello_poser.pyc" // name of the script to execute
}
],
"version": "1.0.3" // version of python script product
}
Other than those requirements, the ZIP can contain any other files of an type and/or subfolders it needs to function.
Python products are all installed into a store front runtime specific folder {store front}/Runtime/Python/{product folder} from each store front from where it was obtained, or the generic "Downloads" runtime for any installed via "Install from ZIP Archive..." menu.
A Python function is provided to confirm the user has purchased the scripts from a store front. Scripts can optionally call this to confirm a purchase. It takes two arguments, a store front id constant, and a store specific product id.
if not poser.VerifyPurchase(poser.kStoreRenderosity, 135457) and
not poser.VerifyPurchase(poser.kStorePoserSoftware, 1003):
raise Exception("Purchase verification failure!")
© 2020-2025 Bondware, Inc. Last updated January 05, 2025