Sun, Nov 17, 3:43 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 Sep 18 2:50 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: multiple prop import


jancory ( ) posted Wed, 24 January 2024 at 6:15 AM · edited Sun, 17 November 2024 at 1:25 PM
Online Now!

https://www.renderosity.com/freestuff/items/69093/obj-importer-plus

is there a script like this anywhere for P13? primarily i'd like to import multiple props at one time. 

-jan-


lost in the wilderness

Poser 13, Poser11,  Win7Pro 64, now with 24GB ram

ooh! i guess i can add my new render(only) machine!  Win11, I7, RTX 3060 12GB

 My Freebies



FVerbaas ( ) posted Tue, 30 January 2024 at 2:37 PM · edited Tue, 30 January 2024 at 2:39 PM
Forum Coordinator

It took a few simple steps to make it run under P13.

I am sure Phil would not have objected me uploading but I do not want today's inquisition on my back.

Drop me a sitemail when you're interested and i'll send you the instructions.  


jancory ( ) posted Tue, 30 January 2024 at 8:08 PM
Online Now!

works great now with the tweaks you showed me.  thank you so much! (and thanks to phil-in-heaven for the original script, miss you!)


lost in the wilderness

Poser 13, Poser11,  Win7Pro 64, now with 24GB ram

ooh! i guess i can add my new render(only) machine!  Win11, I7, RTX 3060 12GB

 My Freebies



FVerbaas ( ) posted Sat, 03 February 2024 at 5:38 AM · edited Sat, 03 February 2024 at 5:39 AM
Forum Coordinator

With many thanks to jancory for testing, instructions are below for those who want to make their own update: 

Open the .py file in an editor (I use Notepad++) and:

- put brackets around the arguments of the print commands.

- in the includes at the top of the script change wx.lib.hyperlink to wx.lib.agw.hyperlink

- dlg.center no longer has a 'direction' keyword. For me it worked to leave that out, just call dlg.Center() without any arguments  (line 382)

- fileDialog styles now have 'FD_' prepended to their names. wx.OPEN has become wx.FD_OPEN, etc. (line 380)

- strings have become different beasts and they are to be handled differently in binary write. I have no idea why Phil resorted to file writing, but the SaveLinesToFile method works after a revision as detailed in the below:



def SaveLinesToFile(lines, filepath):

    fd = open(filepath, 'wb')
    s = "\n".join(lines)       #P13 Was: s=string.join(lines, '\n')
    fd.write(str.encode(s))    #P13 encoded string for binary write
    fd.close()  



And: Some of Phil's scripts tried to write to the folder where the script is, and of course if you put it in the 'old' location under ProgramFiles that will not work because file writing is now protected. 

I ran my version from an arbitrary folder and it worked. Best install under the 'new regime' of python files in library folders to prevent acces right errors.


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.