I have a collection of meshes. I want to insert keyframes to all of them. I can obviously write a 'for' loop to do this. However, to keep the code short, I was trying to use a generator expression like this:
(keyframe_insert(data_path = "location", frame = 1) for ob in col.objects[:])
I am not able to add the keyframes this way. All I am getting is a generator object in return:
<generator object <genexpr> at 0x000001754B1CCB48>
Can someone please tell me what I am missing?