Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 08 5:10 pm)
The script is called only once from a pz2 file, if you put the Python call in the second part of the pose.
Use the following as pz2:
{
version
{
number 6
}
}
{
version
{
number 6
runPythonScript ":Runtime:Python:poserScripts:Test.py"
}
}
Dimension 3D - Poser Tools, Poser Props and Morphs, Cinema 4D
Plugins, and more
Renderosity Store / D3D Web Site
Quote - The script is called only once from a pz2 file, if you put the Python call in the second part of the pose.
Use the following as pz2:
{
version
{
number 6
}
}
{
version
{
number 6
runPythonScript ":Runtime:Python:poserScripts:Test.py"
}
}
Many thanks. That works perfectly. How in the heck did you ever figure that one out? Anyways, thanks again
Actually, it was just luck. I tried a few things to see whether it will have any influence on this behavior.
I just wonder if this is intended behavior or a Poser bug. It looks as if poses are always applied twice, readScript calls in a pose are also executed twice.
Dimension 3D - Poser Tools, Poser Props and Morphs, Cinema 4D
Plugins, and more
Renderosity Store / D3D Web Site
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
It seems that when using the runPythonScript command in a .pz2 file it will run the called python script twice. Quick example:
The .pz2 file contains:
{
version
{
number 6
}
runPythonScript ":Runtime:Python:poserScripts:Test.py"
}
The Test.py program contains:
print "Hello World"
When running this, it will print "Hello World" twice. If I invoke the script from material file (e.g. test.mt5), it runs correctly and prints only once. Any ideas on how to get the runPythonScript command to execute only once from a .PZ2?