Sun, Jan 5, 4:02 AM 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: Is there a way to use Python to check code....


dlfurman ( ) posted Tue, 29 November 2011 at 2:42 PM · edited Sat, 30 November 2024 at 3:12 PM

There is a part of the new Python that has the 2to3 or lib2to3 that can, as the site itself says: "2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code."

Is there a way to run this and check out Poser scripts? Knowing that some scripts will have to be rewritten and recompiled, and that some script writers may not have done so, this will be a way of culling the ones that do/don't, as well as learning a little more about Python.

Some assistance please.

 

"Few are agreeable in conversation, because each thinks more of what he intends to say than that of what others are saying, and listens no more when he himself has a chance to speak." - Francois de la Rochefoucauld

Intel Core i7 920, 24GB RAM, GeForce GTX 1050 4GB video, 6TB HDD space
Poser 12: Inches (Poser(PC) user since 1 and the floppies/manual to prove it!)


bantha ( ) posted Tue, 29 November 2011 at 4:10 PM

I may be mistaken on this, but I don't see why you should convert Poser scripts to Python 3. Poser uses Python 2.7 in P9/Pro 2012, so a Python 3 script could not use Poser's Python API. Did I get something wrong here?


A ship in port is safe; but that is not what ships are built for.
Sail out to sea and do new things.
-"Amazing Grace" Hopper

Avatar image of me done by Chidori


dlfurman ( ) posted Tue, 29 November 2011 at 10:39 PM

There are elements of 3.0 in 2.7 (if I am reading the pages from Python.org correctly), just thought I had a tool to flag the differences from old code/language so it can be edited/fixed to work with PP2012.

I really want to fix ShaderSpider so it can work with PoserPro 2012. As it some of the functions work, except for some of the material handling. This may be due to changes in Python.

As it is, Copy to All, Copy to Matching, Rename Node, Load Partial Shader (partially for some options) work. I like the integration into Poser as opposed to other solutions (that do work, but there is extra mouse clicking to do when compared to ShaderSpider. Not knocking those other solutions).

Well I'll just keep plugging away.

"Few are agreeable in conversation, because each thinks more of what he intends to say than that of what others are saying, and listens no more when he himself has a chance to speak." - Francois de la Rochefoucauld

Intel Core i7 920, 24GB RAM, GeForce GTX 1050 4GB video, 6TB HDD space
Poser 12: Inches (Poser(PC) user since 1 and the floppies/manual to prove it!)


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.