isOfType not returning as expected

Hey all,

Something I’m scratching my head over - I’m hoping someone can point out where I’m going wrong.

I have a GeomNode in my scene.
isOfType( GeomNode ) returns True (as expected)
isOfType( PandaNode) returns True (as expected)
isOfType( Namable ) returns False (huh?)

Looking at the docs it seems like GeomNode and PandaNode both inherit from Namable at some stage - so I would assume that the last query would return True. I have used Namable.getClassType() too but get the same result.

What have I missed here?

It looks like PandaNode fails to declare its inheritance from Namable, a minor bug. I’ll check in a fix. But is this really an important test? In Python, it might be better just to ask hasattr(node, ‘getName’).

David

Not essential, I suppose. I’m creating an attribute editor, and I thought it would be neat to have block of attributes available based on the conditions passed for type of namable, geomNode, light, etc.

Thanks for clearing that one up David, thought I was missing something there :slight_smile: