Fix Python error in scene without sequencer

This commit is contained in:
Brecht Van Lommel
2020-05-06 18:10:42 +02:00
parent c57f65c088
commit 9605c26166

View File

@@ -1975,7 +1975,9 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output, Panel):
col.prop(st, "show_separate_color")
col.prop(st, "proxy_render_size")
col.prop(ed, "use_prefetch")
if ed:
col.prop(ed, "use_prefetch")
class SEQUENCER_PT_frame_overlay(SequencerButtonsPanel_Output, Panel):
@@ -1983,6 +1985,12 @@ class SEQUENCER_PT_frame_overlay(SequencerButtonsPanel_Output, Panel):
bl_category = "View"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
if not context.scene.sequence_editor:
return False
return SequencerButtonsPanel_Output.poll(context)
def draw_header(self, context):
scene = context.scene
ed = scene.sequence_editor