Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
If you import the figure's OBJ file and run the script you'll see the groups listed.
If you use the grouping tool to add groups to the mannequin's head then run the script you'll see the new groups listed.
If you use the IncludeInGroup method be sure to first use the RemoveFromGroup method first.
You are correct there is no current Python method to add new groups.
Thanks for responding so quickly.
I believe that I've understood everything you said except the directions to do a RemoveFromGroup first.
Is this a programmer's suggestion, for tidiness sake, pointing out that I need to go through and clean up the old group's polygon assignments before adding the new ones or is this a Poser Python expert's statement because of something in the operation of Poser Python?
Almost all of my experiments with this have worked without doing the RemoveFromGroup. I'm still chasing a weirdness with reloading a pz3 file.
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've been trying various things with groups in Poser Python (both Poser 7 and Poser Pro) and I'm puzzled. I'd appreciate hearing any observations that the forum members might have.
Let's say that the current actor is the head of the mannequin figure. Then this code
actor = poser.Scene().CurrentActor()
geom = actor.Geometry()
print geom.Groups()
produces
['', '']
while launching the Grouping Tools shows that there are two groups named "head" and "neck".
Shouldn't that call to Groups produce the same thing?
On the other side, I don't see a way to produce new groups on the fly, either. The Polygon method IncludeInGroup appears to require that the group already exist. Or at least, I get
poser.error: No group bit for specified group name. No such group for this actor?
when I try.