[Bf-blender-cvs] [1178046ed22] master: GPencil: Remove Annotations panel from non-preview Sequencer areas
Antonioya
noreply at git.blender.org
Mon Jul 29 22:43:29 CEST 2019
Commit: 1178046ed2227915e2ec73e9fdc90459e1637e9a
Author: Antonioya
Date: Mon Jul 29 22:43:09 2019 +0200
Branches: master
https://developer.blender.org/rB1178046ed2227915e2ec73e9fdc90459e1637e9a
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
===================================================================
M release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
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
More information about the Bf-blender-cvs
mailing list