Forum: Poser Python Scripting


Subject: Is there any way to know if a figure is hair?

maur_2005 opened this issue on Oct 13, 2021 ยท 14 posts


structure posted Fri, 15 October 2021 at 7:33 AM Forum Coordinator

class haircontrols:
    def isithair( self, item ):
badnames = (
"eye", "tongue", "teeth", "hat", "mask", "veil" ) return True if not any(badname in item.InternalName().casefold() for badname in badnames) else False
you can expand the badnames to include anything else that you find in other 
objects that you would not normally find in a hair object.
This is untested but it should work, perhaps with a little 
modification.

Locked Out