Fri, Jul 19, 11:03 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 Apr 26 1:10 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: Calling "Remove Detached Nodes" Wacro in a Script


Iuvenis_Scriptor ( ) posted Sat, 09 March 2024 at 12:11 AM · edited Fri, 19 July 2024 at 12:14 PM

I'm trying to write a script that moves around a few node connections and automatically deletes any nodes orphaned by the process.  I've located the script called by the "Remove Detached Nodes" wacro button, but so far, I haven't been able to get the programmatic call to have any effect.


My code looks like this:


for material in materials:

      //do some stuff that's not relevant here

      clear = poser.AppLocation()+"\Runtime\Python\poserScripts\Wacros\removeOrphans.py"
      (poser.Scene()).SelectMaterial(material)
      poser.ExecFile(clear)



If anyone has any guidance as to what I'm doing wrong, I would greatly appreciate it.  Thanks in advance!


EVargas ( ) posted Sat, 09 March 2024 at 8:38 AM

Hi, try escaping or inverting the slashes, I tested your lines "clear" and "poser.Exec" here and changing to this made the script run for me, with message "please select a material":

"\\Runtime\\Python\\poserScripts\\Wacros\\removeOrphans.py"


Store | Website


Iuvenis_Scriptor ( ) posted Tue, 19 March 2024 at 1:03 PM

Escaping did the trick.  Thanks!


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.