Cut a movie strip using bpy.ops.sequencer.cut?

I’m trying to automate some editing in the video editor.

I selected a movie strip in the video editor and hit “K” to make a soft cut. I expanded the info panel (up top) to see what command had just been executed (it was this: bpy.ops.sequencer.cut(757, type=‘SOFT’, side=‘RIGHT’) )

So, naively, I copied that command into my python script with the appropriate frame number. Now, if I select a strip in the editor and run my python script … nothing happens. Why not?

I noticed that if I ran the command through Blender’s command prompt, it worked.

Hewp meee :frowning:

Anyone out there?

I selected my video strip, then I wrote this in the text editor and ran the script.

import bpy

bpy.ops.sequencer.cut(frame=115, type='SOFT', side='LEFT') 

and it worked. What is the terminal telling you when you run your script from the text editor? I noticed that if I selected a strip that did not contain the frame location of the cut, then the script would do nothing.