Sequencer: Hide panels when there is no actual sequences
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 20 May 2019 15:51:05 +0000 (17:51 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 20 May 2019 15:51:05 +0000 (17:51 +0200)
before this the python script would raise an exception due to
attempt to show properties of None data.

release/scripts/startup/bl_ui/space_sequencer.py

index 55e623c88aa437b938829d0032a24676324bd323..11e147c7175e2de6bd42fdfde3ae98e20aa231d7 100644 (file)
@@ -1467,7 +1467,7 @@ class SEQUENCER_PT_cache_settings(SequencerButtonsPanel, Panel):
 
     @classmethod
     def poll(cls, context):
-        return cls.has_sequencer(context)
+        return cls.has_sequencer(context) and context.scene.sequence_editor
 
     def draw(self, context):
         layout = self.layout
@@ -1487,7 +1487,7 @@ class SEQUENCER_PT_proxy_settings(SequencerButtonsPanel, Panel):
 
     @classmethod
     def poll(cls, context):
-        return cls.has_sequencer(context)
+        return cls.has_sequencer(context) and context.scene.sequence_editor
 
     def draw(self, context):
         layout = self.layout