Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
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"
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'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!