Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
Thanks - that's similar to the approach I've ended up using. I've already had feedback on two other forums which helped clear up my understanding on this. I'm not going to duplicate what I said on them, so I'll just link* to them:
https://community.hivewire3d.com/threads/poserpython-wacros-and-scripts-wacromaterials.904</https:>
https://forum.smithmicro.com/topic/179/poserpython-wacros-and-scripts-wacromaterials/7
(*Links legitimately included on this basis. )
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
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 write a PoserPython script that starts like this:
The script is on my desktop.
I assign my script to one of the ten wacro buttons(alt-click a wacro button to remove the existing assigned wacro, then click the button (now labelled '...') to select and assign my script)
If I now run my script by clicking the wacro button it runs for the current material only, as expected. If I run my script by shift-clicking the wacro button it runs for the all materials of the current object, as expected.
If I run my script via File > Run Python Script it sometimes runs for just the current material, but sometimes for all materials of the current object. It seems to depend on how I last ran a wacro from one of the ten buttons.
It appears as if running a wacro from one of the ten buttons sets/clears a global flag that indicates current/all materials, and it seems that WacroMaterials() builds a list of mats for the current object based on the current setting of this flag.
Does anybody have any insight into this ?
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).