ScriptSpot

Forum topic · General Scripting

Select only items that are not hidden nor on hidden layers

By xXDambielXx · 2010-10-15

Description

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 (2)

xXDambielXx · 2010-10-16

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

filter using .isHidden prop's

veneta · 2010-10-15

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)