Notifications
Clear all

[Closed] How To remove Hidden Objects for Selection Set

Hey

Im Creating SelectionSet .

Set
Character
Props

etc …

i have hidden objects in my Scene that i want to keep them hidden and out of the selection sets .

so what im trying to do is to collect all the Hidden objects, all the Assets and then remove the hidden objects from the selection sets .

thats what im running , any ideas on how to work it out ?

hidden_objects = for obj in objects where obj.isHidden collect obj
selectionSets[“Hidden”]= hidden_objects

selectionSets[“Geometry”] = Geometry

Geo=selectionSets[“Geometry”]
H =selectionSets[“Hidden”]

maybe there is any other better way to solve it .

thanks
D

6 Replies

maybe there’s a better way of doing it

for ss in selectionsets do
(
  selectionsets[ ss.name ] = for s in ss where not s.isHidden collect s
)

Hey

Thanks

What exactly it does ?

i did a quick test and seems that it works , can you explain Please .

thanks
D

Edit – Just Tried it with all the Code that im running and its doesn’t work

What’s so wrong with “regular” Max UI commands/methods that make’s you want to replace them with Maxscript?
That certainly isn’t maxscript purpose

im working on a project and i try to do as much as possible automatically.

when i collect the assets and Create passes im getting also the hidden objects that i want to keep hidden and not visible.

thats pretty much it , instead of hiding them manually i prefer to keep them hidden automatically

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

Consider using layers instead of selection sets. This is a more commonly used technique for organizing a scene. The main difference is that the node can optionally inherit the display settings of its layer.

ok , but any way is there a way to that ?

its really messy , no naming convention or any order .

thanks
D