Cleanup: redundant code from recent sequence fade operator

No need to define class variables which are all overwritten,
also use __slots__ to avoid mistakes.

Remove redundant length check too.
This commit is contained in:
Campbell Barton
2019-09-15 05:56:19 +10:00
parent 14c160334d
commit e9c18ea982
2 changed files with 13 additions and 12 deletions

View File

@@ -761,7 +761,7 @@ class SEQUENCER_MT_context_menu(Menu):
strip_type = strip.type
selected_sequences_count = selected_sequences_len(context)
if strip_type != "SOUND":
if strip_type != 'SOUND':
layout.separator()
layout.operator_menu_enum("sequencer.strip_modifier_add", "type", text="Add Modifier")
layout.operator("sequencer.strip_modifier_copy", text="Copy Modifiers to Selection")
@@ -778,7 +778,6 @@ class SEQUENCER_MT_context_menu(Menu):
if selected_sequences_count >= 1:
col = layout.column()
col.operator_menu_enum("sequencer.fades_add", "type", text="Fade")
col.enabled = selected_sequences_len(context) >= 1
layout.operator("sequencer.fades_clear", text="Clear Fade")
if strip_type in {