Thu, Oct 3, 10:21 AM CDT

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Poser 6 'Cant open script for reading' (runPythonScript from CR2)


3dcheapskate ( ) posted Mon, 02 September 2024 at 3:01 AM · edited Wed, 02 October 2024 at 11:20 PM

I've got a simple CR2 that does nothing except call a PoserPython script.

faKe2yrFidTHr34D6RgSjxQIUyvnXVMHtQlr8ic8.JPG

No problems in PP2014

But in Poser 6 I get this

k56Iffi8LQRKmOYoZ9CqlqWsYHsdJjRX1TYL103I.JPG

So P6 appears to do the runPythonScript, but can't find the script - is that hat's happening ?

Any ideas why ? (the CR2 and script are in the same runtime)


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate ( ) posted Mon, 02 September 2024 at 5:10 AM · edited Mon, 02 September 2024 at 5:10 AM

If I use Windows style path syntax (I'm on Windows 10) it still doesn't work

AKvWdbANRXv6SIfw84CXW9qx2NWuXpJVEmhr2ljI.JPG

But with the full absolute path starting "C:\Users\..." it works.

Of course that's no use in a freebie as I have no idea where users will put the file.

So the new question now becomes "can Poser 6 handle runtime relative paths from a runPythonScript statement in a Poser file ?"


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate ( ) posted Mon, 02 September 2024 at 5:16 AM

And another related question -

which version of Poser was the first to allow Mac syntax runtime-relative pathnames in the runPythonScript statement in a Poser file ?


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



jroulin ( ) posted Tue, 03 September 2024 at 10:29 AM
Online Now!

If it is in the same directory I would try this:

runPythonScriptEx "Classics01.py" 0


3dcheapskate ( ) posted Tue, 03 September 2024 at 11:27 AM

Thanks for the suggestion. I'm very rusty on all this - what's the difference between runPythonScript and runPythonScriptEx ?

I've also just identified a nagging thought - didn't Poser 6 require Python scripts to be in the main Poser runtime, not mapped runtimes ?



The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate ( ) posted Wed, 04 September 2024 at 3:21 AM

My nagging thought was spot on - when I moved my scripts from the desktop runtime I had them in to (backslashes changed to forward slashes simply to post on this forum) C:/Program Files (x86)/e frontier/Poser 6\Runtime/Python/poserScripts/ it worked perfectly, Mac syntax and all.

This is something I clearly knew 12 years ago as it's in the readme of my first freebie with a PoserPython script* - "2 - Copy the contents of the 'Poser Default Runtime' folder from the downloaded zip file to your DEFAULT runtime (These are the PoserPython scripts, which are called from PZ2/PP2 files - if you have several runtimes, then in order for the calls to work it appears that the PoserPython scripts MUST be in the main runtime, i.e. under your Poser installation)."


*South East Asian Duel (Poses, Prop, Scripts) - still avaiable at ShareCG


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate ( ) posted Wed, 04 September 2024 at 3:22 AM

So the question now becomes

Which Poser version was the first to support calling of PoserPython files in mapped runtimes from runPythonScript ?


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



Privacy Notice

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.