Still able to hide objects with python?

I see there was some changes ,but we now have no way of hiding objects with python anymore.

the linked article is pretty old, since then a lot of work has been done on the Python API. use bpy.context.object.hide_viewport or bpy.context.object.hide_render to query the visibility, and bpy.context.object.hide_viewport = True or bpy.context.object.hide_render = True to set the flag.

1 Like

The option with “hide_viewport” got removed. Well, actually it still works ,but doesn’t show it in tooltip.


When you run code you get this.

There is a change in behavior of the buttons for Viewport and Instance visibility. When Alt-Clicking on the Eye Icon, the object should not show up in collection instances any longer. With todays build there is a refresh issue with this system (visibilities in Viewport are not refreshed according to those states), this makes it so confusing at the moment. Seems to be a WIP implementation at the moment.