Remove sequence Text strip in Blender 2.80 In 2.80 I can add a Text effect strip with the following:

    effName = "eff" + tCStr[-3:]
    effName = sequences.new_effect(
        name=tField,
        type="TEXT",
        channel=tChan,
        frame_start=fStart,
        frame_end=fEnd)


That works fine.

However, I also need to remove the strip.

I can remove Image strips with:

sequences.remove(image_strip1)


And I can remove Sound strips with:

sequences.remove(sound_strip1)


I have tried all of the following to remove the Text strips with results as shown.

I'm sure there is a simple way to do this, or failing that, at least some way to do it.

Notes:

• effName is set to a range of values from eff000 to eff010

• tField is set to a range of values from Text0000 to Text0010

• xName is set to either effxxx or Textxxxx

sequences.remove_effect(xName)      


AttributeError: 'bpy_prop_collection' object has no attribute 'remove_effect'

sequences.effect_strip_remove(xName)


AttributeError: 'bpy_prop_collection' object has no attribute 'effect_strip_remove'

sequences.remove(xName)


TypeError: Sequences.remove(): error with argument 1, "sequence" -  Function.sequence expected a Sequence type, not str

sequences.remove(eval(xName))


File "&lt;'string>", line 1, in 
NameError: name 'eff000' is not defined

sequences.remove(eval(xName))


File "&lt;'string>", line 1, in 
NameError: name 'Text0000' is not defined
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)