Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
Flamingo, you've made more progress than I ever did on this question. What exactly did you do to make it work halfway right?
My python page
My ShareCG freebies
Here's a code fragment to chew on.
Basically you export anything. It doesn't matter what it is but calling the export method sets the callback that carries over (not that it should) when you call SaveLibraryProp. Just look at the .pp2 though. No channels section. Very annoying.
Later, C
That's interesting.... Setting up the ImEx mechanism must "reveal" the OBJ information to the part that writes the PP2. With this as a starting point, you could manually write the channels into the file. I think all the necessary channel info for a PP2 is easily available to Python. (That certainly isn't true for a CR2, but the SaveLibraryFigure routine works right, so it's irrelevant.)
My python page
My ShareCG freebies
I've noticed that too. When you enumerate the options, you'd think that those are the only ones that have an impact on the export. Not always the case.
Grafting in the missing section is a way to go but I wondered if there wasn't another hidden ImEx option you can set to have it include that section. There has to be actually because the internal code would be setting it when Poser exports a pp2. It's not clear however, if that option setting is exposed to Python.
Trouble there is finding it. You could just fling constants at it and observe the behavior but the problem there is that if you give it an integer when it's expecting a float it tends to just die and not raise an error. Ask me how I know.
Either way, seems we might have something that'll work if all the channel info is available.
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.
Hello all! Just kind of tripped over this forum and I'm kind of stuck on this one. Hoping I'm overlooking something blatantly obvious.
Start Poser and try to use the SaveLibraryProp method, it gives you a lovely blank pp2 file. No problem I think, it obviously needs a callback to tell it which actor to save. Hmm, no documented way to do that.
Turns out, if you have called the Export method previously, that sets the callback for ya and it'll save the prop.
One problem. It saves the prop without the channels so when you pull the darn thing back in later it's pretty much welded permanently in the center of the scene.
Anybody got any thoughts on this?
Thanks, Craig