Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2025 Feb 05 6:41 am)
P.S. also just checking to see if anybody, especially the folks who've been patiently answering my stupid questions for years, is still here... ;o)
This forum seems almost as still as a graveyard. Where's the best place to ask PoserPython questions now ?
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).
P.S.2: That list of 'isXyz()' functions was all the actor ones in the P6 PoserPython manual except IsProp() Trying the logic the other way round, i.e...
aAct= poser.Scene().Actors()
for act in aAct:
if act.IsProp():
print("IsProp YES! "+act.Name())
...gives me exactly the same.
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).
I never found a good answer to your question. Being a pragmatist, I didn't keep looking, but instead added this list of specific named elements I intend to ignore:
ignoredTargets = set(['CenterOfMass', 'GoalCenterOfMass', 'FocusDistanceControl'])
I also have a function I made similar to your giant if statement that determines if an object is an ordinary prop:
def isOrdinaryProp(actor): if actor.IsCamera() or actor.IsLight() or actor.IsBase() or actor.IsBodyPart() or actor.IsZone() or actor.IsDeformer() or not itemHasMaterials(actor): return False return True
def itemHasMaterials(item): try: return item.Materials() except: pass
Then where I want a list of all possible targets for materials or whatever, I do this:
elements = scene.Figures() + [e for e in scene.Actors() if isOrdinaryProp(e) and e.Name().split()[0] not in ignoredTargets]
I don't remember why I split the name and just take the first part. It's probably because some of the names appear with additional tokens that confuse the match.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)
I don't know how to use this stupid markdown editor and I do not intend to. Sorry about the code line breaks and indents getting messed up.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)
The markdown is part of the reason I'm not writing here. It's an idiot's tool from 1984. I cannot imagine why we need to take a step back from WYSIWYG.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)
Also I don't get ebots except for new threads, so if you reply and I don't answer, it isn't because I hate you. It's because THIS SITE SUCKS DONKEY BALLS.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)
Thank you - I won't look any further then (edit to clarify because of the intervening posts: that was a response to your "I didn't keep looking" in your first post)
And don't worry about the forum de-formatting your post, I should be able to work it out ;o)
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).
Thanks, so that's a double confirmation (yourself and bagginsbill) that there doesn't seem to be any easy way. I've already adopted bagginsbill's workaround, although I'll probably ask a few more questions about that (probably at CGbytes)
Anybody else (PhilC, ockham, etc) care to confirm confirm that there's no easy way that they can think of?
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 want to iterate through all 'things that can be held in a figure's hand' type props in the scene (i.e. not lights, magnets, etc)
This bit of code...
...gives me this in a simple test scene...
Yes, the question is how to exclude GROUND, FocusDistanceControl, GoalCenterOfMass, and CenterOfMass ? I only want stuff like valPoArLeafspear to get through.
I'd like a solution that works as far back as Poser 6
(I'm fairly sure that for GROUND I'll have to check the name and internal name, but hoping there's something I've missed that'll catch the others)
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).