I wrote a small script that should:
- unhide
- enable in viewport
- enable in render
- enable selectable
for ALL objects in the scene
import bpy from bpy import context from bpy import data # all objects all_objects = data.objects for ob in data.objects: ob.select_set(True) ob.hide_set(False) ob.hide_render = False ob.hide_select = False
However it wont toggle everything on, there are still objects or collections turned off.
Before:
After:
Is it perhaps not selecting everything with data.objects? Maybe i'm misunderstanding it.
Update:
I updated my script to include collections but it gives me an error
import bpy from bpy import context from bpy import data for collection in bpy.data.collections: collections.hide_viewport = False for obj in collection.all_objects: obj.select_set(True) obj.hide_set(False) obj.hide_render = False obj.hide_select = False
Error: AttributeError: 'list' object has no attribute 'hide_viewport'