Select only items that are not hidden nor on hidden layers

I'm working on a script that cleans up an imported file.. and it does what I want.. for the most part in my test file.. but in a real file, I discovered that instead of selecting all visible objects, it selects all object in my scene weather they are on hidden layers or not... I would expect "select $*" to only select objects that are visible or on visible layers.. but that doesn't seem to be the case.. what do I need to do to only get the objects/nodes that are visible in my selection array?

Thanks for your replies..

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
xXDambielXx's picture

thanks

Thanks Veneta, I'll try to search harder next time before posting, I'm new to the site and scripting.

veneta's picture

filter using .isHidden prop's

am sure i read before similar questions here with good reply, but here is:
select(for o in objects where not o.isHidden collect o)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.