Wed, Sep 18, 10:47 PM CDT

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: Loading Superfly preferences via Python


Bastep ( ) posted Sat, 02 January 2021 at 3:07 AM · edited Mon, 02 September 2024 at 12:57 AM

First of all a happy new year to all!

I have noticed that the SuperflyOptions object retrieved via poser.Scene().CurrentSuperFlyOptions() has no method to load or save the options. How can I still load an preferences file?

Greetings



HartyBart ( ) posted Sat, 02 January 2021 at 5:59 AM

A couple of weeks ago the Renderosity Freestuff had three example Python scripts, showing how to have a script load a saved render-engine preset for Poser. The examples are for SuperFly, Firefly and Sketch.



Learn the Secrets of Poser 11 and Line-art Filters.


Bastep ( ) posted Sat, 02 January 2021 at 9:11 AM · edited Sat, 02 January 2021 at 9:22 AM

Thanks for the info. But I was already so far. But like poser 12, poser 11 is missing the LoadPreset method! This is another half finished thing in the Poser Python SDK that drives me crazy. Unlike poser.Scene().CurrentFireFlyOptions(), poser.Scene().CurrentSuperFlyOptions() is missing the LoadPreset and SavePreset methods.

scene = poser.Scene()
option = scene.CurrentSuperFlyOptions()
scene.SetCurrentRenderEngine(poser.kRenderEngineCodeSUPERFLY)
option.LoadPreset(r"C:\Users\Bayer\AppData\Roaming\Poser Pro11\Render\Presets\SuperFlyTest.prp")
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: LoadPreset

The attribute error says it all!

Greetings



HartyBart ( ) posted Sat, 02 January 2021 at 10:55 AM

Thanks. Perhaps it will be enabled when the final release of Poser 12 appears.

Just for future reference, over in DAZland today Algovincian has also posted a method to do the same 'load a render preset, and make a render' thing in DAZ Studio.

var oRenderMgr = App.getRenderMgr();
var oContentMgr = App.getContentMgr();
oContentMgr.openFile("myDir|myFile.duf", true);
oRenderMgr.doRender();

Replace | with forward slash.



Learn the Secrets of Poser 11 and Line-art Filters.


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.