Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
Quote - OK that squashes that idea :)
Are the lights in a remote runtime library?
If so does it work if they are in the local library?
I've tried both -- selecting lights from the local library and remote runtimes. I get the same phenomenon.
Once I do select a light set manually (from the "Please locate file..." dialog), Poser remembers that directory, and looks for any selected light sets there. If I subsequently choose a light set from that directory, the script finds it. But if I browse to another directory and choose a light set, Poser asks me to locate the file again when it tries to load it.
Interestingly, the script also seems to remember the LAST directory from which I manually selected a light set, even between restarts of Poser. I am not sure how that's happening, since I added no code to store that information.
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.
My Poser gui selects multiple light sets, so as to perform a batch render of a scene using each light set selected.
The problem is, while the light sets seem to be selected properly, when I render, Poser won't find them using the given paths.
Here is the relevant code:
(self.lightlist is a Listbox.)
This works fine -- I get the lightsets selected, with their full path names.
Then I press the render button, which does this:
(Code for saving files to the output directory omitted.)
Notice that I added a check that the lightset file being loaded actually exists. But this doesn't work -- the file does exist, yet when it comes to LoadLibraryLight, Poser pops up a dialog asking me to locate the file in question. Note that it pops up the dialog with the directory in which the file is located being the default location. And once I select a file, it does find all the others correctly -- and will do so again without any warnings if I hit the render button again. But it can't seem to find the file correctly the first time.