Sun, Feb 16, 11:17 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: 2025 Feb 05 6:41 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: Remember floating-docked and position


vholf ( ) posted Sat, 08 September 2012 at 7:38 PM · edited Thu, 23 January 2025 at 9:46 PM

Hello,

I've created a python script with a small window with some info, I'd like Poser to remember if the window was floating/docked and it's position in the interface from the last run.

Does Poser have a way to handle this configuration? or do I have to watch the position and resize events, and build my own config file?.

I'm using Poser 2012 SR3, but avoiding the Addon framework for backward compatibility.

Thanks :)


LaurieA ( ) posted Sat, 08 September 2012 at 8:35 PM · edited Sat, 08 September 2012 at 8:40 PM

http://forum.runtimedna.com/downloads.php?do=file&id=787

This a really useful script. It has a startup manager that opens to place scripts between sessions. Also, Netherworks has a script that will launch any script on Poser startup (in RDNA Zero Priced Items). If you use that to open the Startup Manager then you have a nice panel with your favorite scripts that will launch when Poser does :).

Laurie



markschum ( ) posted Sun, 09 September 2012 at 12:13 AM

I believe you have to manage things with a config file.


vholf ( ) posted Sun, 09 September 2012 at 1:34 AM

Thank you.

I do know this has to be handled with a config file, what I'm wondering is if Poser has any undocumented features to do that, or if I have to do things manually.

The script is very very simple, adding a config handler class and parsing config files would require more effort than writing the script itself lol, but if there's no other way...


Dizzi ( ) posted Sun, 09 September 2012 at 4:33 AM

Yes, Poser has a way: UI dots ;-) They save script positions, too, but you'll have to click the stored UI dot after loading the script of course ;-)

You don't need any parsing, if you use pickle.dump() and pickle.load() to store your data. 



Snarlygribbly ( ) posted Sun, 09 September 2012 at 11:27 AM

Quote - The script is very very simple, adding a config handler class and parsing config files would require more effort than writing the script itself lol, but if there's no other way...

Actually, this is fairly trivial and only requires a few lines of code added to your script.

Python has all the functionality you need built into it - just use the ConfigParser module:

http://docs.python.org/library/configparser.html

Free stuff @ https://poser.cobrablade.net/


vholf ( ) posted Sun, 09 September 2012 at 11:49 AM

Aha! thank you guys, that's what I thought, being such a trivial issue I was certain there were libraries or classes ready to do the job.

Most apreciated.


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.