Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
Hi, maybe you could try and "guess it" based on the geometry path?
actor = scene.CurrentActor()
geomPath = actor.GeomFileName()
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.
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, Sonoma 14.6.1, 16GB, 500GB SSD
👿 Nas 10TB
👿 Poser 13 and soon 14 ❤️
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.
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.
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.
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.
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.
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.
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.
I am in Poser, with a particular file selected:
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:
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?