Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
Since Poser 7 SR3 and Poser Pro SR1, the script doesn't need to be in the main Poser runtime. It is looking for the script as it looks for a texture...
But some scripts needs to be in the main Poser runtime if they have specific code inside (ths script I'm doing always use this, for backward compatibility).
semidieu, yes I saw that nifty little feature that was added to Poser but like you, I need to worry about the backward compatibility issues. I was hoping there was some symbolic keyword or some magical formating string I could stick inside of a PZ2 file to indicate that the script search should be directed into the current runtime. I suspect there isn't such a beast, otherwise the Poser folks would not have made the new local runtime script execution change in SR3 and Poser Pro.
Phil, I considered your idea which is a good one since I could just place a small script in the Main Poser Runtime and have it search and load a script by iterating through the libraries as you suggest. The problem is that Poser 6 doesn't support the Libraries() method - only P7. So I would be limited to Poser 7 or greater for the products.
What I'm trying to do is to simply bury some scripts behind buttons in the Pose folder of the runtime. Ideally, I would love to just stick the scripts in the same Pose folder with all of the .PNG files and PZ2's. I would even settle for having the scripts located in the users local Python scripts runtime - which according to semideu, is possible with SR3 and Pro.
What can be done is the following... create a script that move the all scripts in the correct runtime.
The script would browse all connected runtimes and search for a python folder.
Then, it will copy all scripts from external runtime (located in the python folder) to the Poser runtime.
This would allow to create the 'launcher' as pz2 or cr2 and put then in any libraries. Once the copy script is launched, you don't have to care for where the scripts are installed...
Also, for the Libraries() method, I build one that is working for poser 6 if you want :)
Quote - What can be done is the following... create a script that move the all scripts in the correct runtime.
The script would browse all connected runtimes and search for a python folder.
Then, it will copy all scripts from external runtime (located in the python folder) to the Poser runtime.This would allow to create the 'launcher' as pz2 or cr2 and put then in any libraries. Once the copy script is launched, you don't have to care for where the scripts are installed...
Also, for the Libraries() method, I build one that is working for poser 6 if you want :)
Terrific idea semideu. Yes, I would love the P6 version of the Libraries() method. Can you either post it here or just e-mail to me at dburdick@SkinVue.net
Thanks again
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.
I there anyway to launch a Python script from a PZ2 or CR2 file that tells it to use the currently loaded Runtime path as the path to the script? It seems that all scripts which are executed from a PZ2 or CR2 have to be located in the main Poser runtime (where the Poser app is located). What I'm trying to do is to get around of forcing the user to have to install any of my products on the main Poser runtime versus simply installing it on runtime they choose. I see that in Poser 7 Python, there is a new Libraries() method which will return a list of all of the available runtimes but it does not indicate which runtime is currently loaded. What is needed is something like a symbolic link to the currently loaded runtime - e.g.:
:$Runtime:Libraries:Python:poserScripts......
Any ideas?