Thu, Nov 7, 2:34 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 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: Installing Third-Party Packages into Poser's Internal Python Installation


Iuvenis_Scriptor ( ) posted Tue, 24 May 2022 at 10:24 PM · edited Thu, 07 November 2024 at 1:09 AM

On a whim, I decided to spend the better part of the day seeing if I could streamline and maybe even automate a particular postwork process that I like to call "filmicization."  Basically, it's all about emulating a much more lifelike color space (if I understand things correctly, ACES, the industry standard in film) rather than the apparently crappy sRGB that comes grandfathered into most household computers.  If you're interested in a more detailed explanation, this video from a Blender user does a great job.

While a plug-in makes "filmic" renders easy in Blender, filmicization of Poser renders originally involved re-rendering a previous SuperFly render on a square plane prop in FireFly, using a special shader designed by the ever indispensable BagginsBill, bringing both the original and the re-render into Photoshop, and overlaying a high-pass of the former over the latter to restore some of the fine detail that's inevitably lost otherwise.  What I've done is take the math that BB does with nodes and implemented it in a Python script that operates directly on an exported HDR render.  At least to me, the results are quite satisfying.  It's much simpler, quicker, and avoids that loss of fine detail that I kept having to add back in.

I would like to post this as a freebie, but it does require a third-party Python package called OpenCV, which is easy to install...in a Python instantiation that's independent from Poser.  I want to make it as user-friendly as possible, so I'd really prefer to be able to install it into Poser's internal Python instantiation, which is the one thing I haven't been able to figure out how to do yet, short of manually copying the files from my independent Python into Poser's Python.  So I would greatly appreciate anyone who can point me in the right direction!  Thanks in advance!


structure ( ) posted Tue, 24 May 2022 at 10:41 PM · edited Tue, 24 May 2022 at 10:43 PM
Forum Coordinator
import pip
pip._internal.main( [ 'install', packageName ] )


I am not sure if this still works, but this is how it was done when we upgraded to python3.7

Locked Out


Iuvenis_Scriptor ( ) posted Wed, 25 May 2022 at 12:10 AM

I don't think so, unfortunately.  It gave me this.

ERROR: Could not find a version that satisfies the requirement packageName (from versions: none).


Y-Phil ( ) posted Wed, 25 May 2022 at 2:41 AM · edited Wed, 25 May 2022 at 2:45 AM

In fact, often, these packages have dedicated name for Python's world. In this case, give the official documentation, this works:

pip._internal.main(['install', 'opencv-python'])

On my Win10 platform, Poser thought quite a few seconds after sending ansi-escaped lines as pip does in any console. But it seemed to work


𝒫𝒽𝓎𝓁


(っ◔◡◔)っ

👿 Win11 on i9-13900K@5GHz, 64GB, RoG Strix B760F Gamng, Asus Tuf Gaming RTX 4070 OC Edition, 1 TB SSD, 6+4+8TB HD
👿 Mac Mini M2, Sonoma 14.6.1, 16GB, 500GB SSD
👿 Nas 10TB
👿 Poser 13 and soon 14 ❤️


Iuvenis_Scriptor ( ) posted Wed, 25 May 2022 at 11:37 AM

Well, it took me a bit to figure out that I had to restart Poser for it to take effect, but Y-Phil's solution worked for me too!  Thanks, guys!  If you're interested, here's the freebie.


Y-Phil ( ) posted Wed, 25 May 2022 at 2:17 PM

Iuvenis_Scriptor posted at 11:37 AM Wed, 25 May 2022 - #4439123

Well, it took me a bit to figure out that I had to restart Poser for it to take effect, but Y-Phil's solution worked for me too!  Thanks, guys!  If you're interested, here's the freebie.

Thank you for sharing 😄


𝒫𝒽𝓎𝓁


(っ◔◡◔)っ

👿 Win11 on i9-13900K@5GHz, 64GB, RoG Strix B760F Gamng, Asus Tuf Gaming RTX 4070 OC Edition, 1 TB SSD, 6+4+8TB HD
👿 Mac Mini M2, Sonoma 14.6.1, 16GB, 500GB SSD
👿 Nas 10TB
👿 Poser 13 and soon 14 ❤️


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.