I am trying to create a python script that creates NLA strips for a selected group, and sets the start frame for each of the generated strips.
So I have a scene where I've keyframed a few objects and grouped the objects that have the keyframes. I've put together what I've learned of Blender's Python so far and created a script that I thought would select my group, make some NLA strips for the selected objects, and set the start frame of all strips at frame 60.
It's not quite working as I had hoped. Several strips are created, and only some of them have their start frame controlled. Does anyone have any ideas as to what could be the issue?
#Anim controls bpy.ops.object.select_same_group(group="MyGroup") nla_strips =  for obj in bpy.context.selected_objects: if obj.animation_data is not None: action = obj.animation_data.action if action is not None: track = obj.animation_data.nla_tracks.new() track.strips.new(action.name, action.frame_range, action) obj.animation_data.action = None if obj.animation_data and obj.animation_data.nla_tracks: for track in obj.animation_data.nla_tracks: for strip in track.strips: nla_strips.append((strip,)) strip.frame_start = 60