Can anyone tell me how I can choose an arbitrary object from within a collection? My script leaves me with nothing active (or selected) at one point, but I need something to be active.
I have the collection name from this:
Coll = bpy.data.collections.get('Structure')
So I can do something like this:
if Coll: for obj in Coll.objects: obj.select_set(True)
Which makes each object active one at a time, leaving me with the last one active at the end of the loop. But that seems pretty heavy handed. There must be a neater way.