Overwrite() result differs from Overwrite edit

Hi hi,

Been working with PySequence.overwrite() and I wanted to reach out see if anyone could shed any light.

Im trying to overwrite only the audio tracks. I made 2 dummy clips. One is color sources stacked up in Versions with tone stereo mix. The other is an empty sequence.

If I do this manually it works as expected…

  1. lock the video track of the target
  2. open the target as a sequence
  3. select the source & overwrite edit
  4. only the audio tracks are edited in

But when i use overwrite() with this (see the script attached below), it correctly ignores video V1.1 from the lock, but edits in V2.1 & V3.1.

  1. install the little script below
  2. select source first
  3. then shift + select target
  4. right click > Examples… > Example Overwrite Inconsistency

To me, thats not the expected result. Its like its patching imaginary destination versions.

example_overwrite_inconsistency.py (1.1 KB)

It does work correctly if the color sources are stacked on tracks instead of versions.

I could use execute_shortcut, and might have to end up doing that… just seems a bit low level. Slow.

Thanks in advance for any input.

I haven’t experienced this exact issue but I’ve had lots of trouble with overwrite() cutting things in at the wrong frame. I have one script that uses overwrite to just plop a slate on frame 1 and it’ll work great for months then one day decide that that actually means frame 1 minus the head-handles of the incoming clip, eg. frame -7 for an 8-handled clip, so then I adjust the script to account for that, which will work for a while, and then it wants it to be frame 1 again seemingly arbitrarily. execute_shortcut() pretty much always works as expected but does slow down script execution in my experience.

Just to wrap this up… I found it works reliably if I lock tracks on the source, instead of the destination, before performing the overwrite().

Hi Kieran

From my recollection of the smoke days, editing is limited to a single video track. Your screengrabs suggest the source has no tracks selected (swiped green), and the destination also.

is this what you mean?

Throw an upvote over here if you think this would help:

# FI-03063 Python API: Timeline Patching and Reordering Versions


@knhn is this helpful?