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
This commit is contained in:
parent
2b8bc1a22e
commit
1178046ed2
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue