Thu, Sep 19, 12:17 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: Accessing Poser Files Directly


JimX ( ) posted Sun, 11 June 2023 at 10:38 AM · edited Sat, 07 September 2024 at 2:35 AM

I am in Poser, with a particular file selected:

BOSIymBwNZ889u2pJoy4XxxiqO2228tGUFSqirvX.jpg

Is there any way to get the path of that file so that I can open tit in a Python script directly, without having to use anything like the FileDialogChooser?

Similarly, with a library chosen like:

y1DSNdXCVaQIdgCX0kXVaGoMrwTOXxTAoHn0sc29.jpg

Is there any way to open that folder directly (so I can write a file into it), without having to use anything like the FileDirChooser?


FVerbaas ( ) posted Sun, 11 June 2023 at 1:50 PM · edited Sun, 11 June 2023 at 1:50 PM
Forum Coordinator

Unfortunately the library can not be accessed via Python. 


EVargas ( ) posted Sun, 11 June 2023 at 3:02 PM

Hi, maybe you could try and "guess it" based on the geometry path?

actor = scene.CurrentActor()
geomPath = actor.GeomFileName()


EVargas.Art


JimX ( ) posted Sun, 11 June 2023 at 3:36 PM

What I was trying to do is manipulate some things in a material (or material collection) file. So the CurrentActor() would actually be a hr2 or pp2 file.

But. you've got a good idea about getting at least a guess as where to start DialogDirChooser: same Runtime as the geomPath, but over in the Materials library.


Y-Phil ( ) posted Mon, 12 June 2023 at 1:39 AM
Online Now!

There's a way using the material that's already loaded, especially if there's a bitmap, but I'm not sure if the Library Window is sufficiently talkative to expose what is actually selected in which tab).
There are many parts I would like  to be exposed, such as the groups in the Property Window, too.

𝒫𝒽𝓎𝓁


(っ◔◡◔)っ

👿 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, 16GB, 500GB SSD
👿 Nas 10TB
👿 Poser 13 and soon 14 ❤️


HartyBart ( ) posted Mon, 12 June 2023 at 3:59 PM

I'm not at all sure what you're trying to do or why. But perhaps the free "Find it - three Python finder scripts for Poser 11" on ShareCG might interest. Not geared for Hairs, but you might hack it to work with them....

"a set of three helpful 'finder' Python scripts for Poser 11. Each script detects and then inspects the current figure in your Poser scene. The chosen script then tries to open Windows Explorer on the correct path for either the figure's .CR2 files, .OBJ files, or the .MATs and/or Poses for that figure."



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


JimX ( ) posted Mon, 12 June 2023 at 5:44 PM

I'm trying to apply Texture Maps without applying Transparency Maps, and/or apply Transparency Maps without applying Texture Maps. Using Poser 11 on a Mac.

Those scripts sound interesting. I'd like to look into them.

I created an account on ShareCG. But I can't find those three scripts.


HartyBart ( ) posted Tue, 13 June 2023 at 4:39 PM

Search DuckDuckGo for "Find it - three Python finder scripts for Poser 11" (include quote marks) and it's result No.1. I'd link it here, but we're not allowed to link to competitor stores.

But it sounds like what you really want is a script that just disconnects all the transparency map nodes, or disconnects all the other texture map nodes? In which case that's fairly simple. But why would you need to do that?



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


JimX ( ) posted Wed, 14 June 2023 at 12:28 PM

OK. I'll try that search.

Actually, what I want to do is to REPLACE all the Transparency Nodes, but none of the Texture Nodes. And vice-versa.

Actually, I found a reference in the online Poser documentation that says you can call a script out of a pz2 file. The mt5 and mc6 files have a similar structure, and I tried it with them. It worked. This gives my another set of things to try.

So I've got a couple of avenues to go down. Options are always good.

Many thanks.


HartyBart ( ) posted Wed, 14 June 2023 at 1:42 PM · edited Wed, 14 June 2023 at 1:42 PM

If you want a disconnector script, as an example to tweak, there is one on ShareCG as "Simple Python script to disconnect all bump maps" in a scene. That's for Poser 11. There's also a Poser 12 one called "Python script to disconnect all bump maps - P12".  Useful for rendering speckle-free in Firefly with a 'with cartoon lines only' preset (included). Or before sending the scene to Vue, where the bump mapping just won't be seen on the figures / props amid a huge landscape / atmosphere.



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


JimX ( ) posted Wed, 14 June 2023 at 2:05 PM

I downloaded the three finder scripts. In the process, I found that they are available right here in the Renderosity Free Stuff.

I can't use the scripts directly, as they depend on Windows-only executables, and I'm on a Mac. But there are some good ideas in the code that might give me some inspiration.


HartyBart ( ) posted Thu, 15 June 2023 at 5:36 PM · edited Thu, 15 June 2023 at 5:37 PM

I forgot they were also on Rendo. Oh well, at least you got onto ShareCG - there are lots of scripts there that are not on here. Great freebies, too.

I'd also forgotten they used Windows .BAT files as an intermediary. Maybe there's a Mac equivalent? .BAT files are just simple text instructions to Windows.



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.