show/hide query [SOLVED]

Is there a method to query a nodepath and find out if it has been shown or hidden using hide() and show(), or do I need to make a state switch to store that value?

Don’t forget the API Reference. :slight_smile:

You can ask nodePath.isHidden(), which will return true if the node itself, or any parent node, is hidden.

If you want to know whether hide() was called on the nodePath itself, neglecting parents, you can use (nodePath.getHiddenAncestor() == nodePath).

David

Hey drwr, on that note… could you add a search feature inside the API Reference? I think that would help out a lot for finding things.

The API reference has nothing to do with me, actually, but rdb is working on a replacement for the current API reference, using doxygen. I believe rdb’s replacement system will include a search function.

David

I went right down the list of methods in NodePath in the reference, I guess I just didn’t see it. Thanks.

panda3d.org/dox/python/html/annotated.html
Search feature in the top-right corner. :slight_smile: