I'm using blender 2.93 so not sure if that changes anything but i'm trying a simple script as found here
import bpy
for o in ("Cube", "Camera", "Light"):
obj = bpy.context.scene.objects.get(o)
#if obj: obj.hide_viewport = False
if obj: obj.hide_set(False)
I have made a simple scene with cubes, point lights and cameras, some hidden, but if I run the script, nothing happens. It doesn't give any errors either so im not sure what I'm doing wrong. I'm so stupid I guess. Any ideas?
Files here Script file Scene
for obj in (o for o in bpy.context.scene.objects if o.type == 'LIGHT'):Here are all the possible object types : https://docs.blender.org/api/current/bpy.types.Object.html#bpy.types.Object.type (Make sure you use all caps) – Gorgious Sep 03 '21 at 07:46