I’ve got a selection of clips that I’m trying to change the start and positioner timecode of using python. However, I’m noticing that I cannot set the current time past the Media End on the PyClip, and if I open it up as a PySequence, I can’t get it to accept current time as an attribute of the PySequence. The result of which means, I have to either open the clip as a sequence first (in which case it runs successfully). Ideally, I’d like to get the script to open the clip and apply the PyTime changes, but perhaps I’m trying to do something that isn’t possible. Any insight would be appreciated! Here is the Python script:
Best,
Mike
“”"
target_timecode = ‘00:59:47:00’
target_fps = ‘23.976 fps’
positioner = ‘00:59:58:00’
if not selection:
print("No items selected. Please select one or more clips.")
return
for item in selection:
if isinstance(item, (flame.PyClip, flame.PySequence)):
try:
item.open_as_sequence()
new_time = flame.PyTime(target_timecode, target_fps)
item.start_time = new_time
item.current_time = flame.PyTime(positioner, target_fps)