You have to pass an object of type bpy.types.Sequence
into bpy.types.Sequences.remove()
. This means you can pass the return value of sequences.new_effect()
into sequences.remove()
. In the example in your question that reference would be stored in effName
.
bpy.context.scene.sequence_editor.sequences.remove(effName)
If you don't have a reference to the sequence anymore, you will have to retrieve it from:
bpy.context.scene.sequence_editor.sequences_all
Update: Since there seems to be some misunderstanding about my explanation, you find a fully functional code example below. As I said before, you need to store the return value of new_effect()
to later us it as input for remove()
.
import bpy
sequences = bpy.context.scene.sequence_editor.sequences
names = ['a', 'b', 'c']
tChan = 0
fStart = 0
fEnd = 50
text_effects = []
for name in names:
text_effect_strip = sequences.new_effect(
name=name,
type='TEXT',
channel=tChan,
frame_start=fStart,
frame_end=fEnd
)
text_effects.append(text_effect_strip)
for text_effect_strip in text_effects:
sequences.remove(text_effect_strip)