Select by visibility

i have a scene that contains millions of objects, some of them are Visibility 0 in object properties
i only see them when i go Wireframe view, i have to select them all and delete
is there any script or code for do that?

note:they're not visibility box checked or not. its visibility 0.0

Comments

Comment viewing options

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

.

Yep. I forgot about this and tested only with objects with Visiblity set to arbitrary value.

This will work with all objects:

(	
	select (for o in objects where (getVisController o) != undefined and o.visibility.controller.value == 0.0 collect o)
)
(	
	delete (for o in objects where (getVisController o) != undefined and o.visibility.controller.value == 0.0 collect o)
)
miauu's picture

.

This will select all objects with visibility = 0.

(
	select (for o in objects where o.visibility.controller.value == 0.0 collect o)
)

This will delete all objects with visibility = 0.

(
	delete (for o in objects where o.visibility.controller.value == 0.0 collect o)
)
jahman's picture

~


mxs reference:
By default, there is no controller assigned to the visibility track. Accessing the .controller property of the visibility track will throw an error.

miauu's picture

.

Yep. I forgot about this and tested only with objects with :)

Comment viewing options

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