Wed, Dec 4, 9:19 PM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)

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: SaveLibraryPose Issue


CastIronFlamingo ( ) posted Sun, 23 November 2003 at 5:20 PM · edited Wed, 04 December 2024 at 9:07 PM

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


iamonk ( ) posted Tue, 25 November 2003 at 8:31 AM

I think someone once said this was broken or something.


ockham ( ) posted Tue, 25 November 2003 at 11:51 AM

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


CastIronFlamingo ( ) posted Tue, 25 November 2003 at 5:08 PM

file_85278.jpg

Flamingo? lol, Craig works too.

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


ockham ( ) posted Tue, 25 November 2003 at 5:26 PM

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


CastIronFlamingo ( ) posted Tue, 25 November 2003 at 5:45 PM

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.


CastIronFlamingo ( ) posted Wed, 26 November 2003 at 8:26 AM

Yep. That'll work. I'll package it up with the others and post it over at GPA.


CastIronFlamingo ( ) posted Sun, 07 December 2003 at 6:18 PM

Posted those scripts in me free stuff section if anybody is interested. Sorry for the delay, had lots of unrelated stuff to clear off first.


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.