diff options
author | Antonioya <blendergit@gmail.com> | 2019-07-29 23:43:09 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-07-29 23:43:25 +0300 |
commit | 1178046ed2227915e2ec73e9fdc90459e1637e9a (patch) | |
tree | b8b6fc8183485d8c4fa13e462b39c81737d50dea /release/scripts | |
parent | 2b8bc1a22ecbf2dc7b23ac82f293a4d31b0e8b33 (diff) |
GPencil: Remove Annotations panel from non-preview Sequencer areas
Fix by: Peter Fog (@tintwotin)
I did some small changes to original differential code.
Differential Revision: http://developer.blender.org/D5306
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index ff71c7a825a..d5ef24d7ff3 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -1996,6 +1996,15 @@ class SEQUENCER_PT_annotation(AnnotationDataPanel, SequencerButtonsPanel_Output, bl_region_type = 'UI' bl_category = "View" + @staticmethod + def has_preview(context): + st = context.space_data + return st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'} + + @classmethod + def poll(cls, context): + return cls.has_preview(context) + # NOTE: this is just a wrapper around the generic GP Panel # But, it should only show up when there are images in the preview region |