Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_sequencer.py
| Context not available. | |||||
| ) | ) | ||||
| from bl_ui.properties_grease_pencil_common import ( | from bl_ui.properties_grease_pencil_common import ( | ||||
| AnnotationDataPanel, | AnnotationDataPanel, | ||||
| GreasePencilToolsPanel, | |||||
| ) | ) | ||||
| from rna_prop_ui import PropertyPanel | from rna_prop_ui import PropertyPanel | ||||
| Context not available. | |||||
| col.prop(mod, "gamma") | col.prop(mod, "gamma") | ||||
| class SEQUENCER_PT_grease_pencil(AnnotationDataPanel, SequencerButtonsPanel_Output, Panel): | class SEQUENCER_PT_annotation(AnnotationDataPanel, SequencerButtonsPanel_Output, Panel): | ||||
| bl_space_type = 'SEQUENCE_EDITOR' | bl_space_type = 'SEQUENCE_EDITOR' | ||||
| bl_region_type = 'UI' | bl_region_type = 'UI' | ||||
| bl_category = "View" | bl_category = "View" | ||||
| # NOTE: this is just a wrapper around the generic GP Panel | @staticmethod | ||||
| # But, it should only show up when there are images in the preview region | def has_preview(context): | ||||
| st = context.space_data | |||||
| return (st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}) | |||||
| class SEQUENCER_PT_grease_pencil_tools(GreasePencilToolsPanel, SequencerButtonsPanel_Output, Panel): | @classmethod | ||||
| bl_space_type = 'SEQUENCE_EDITOR' | def poll(cls, context): | ||||
| bl_region_type = 'UI' | return cls.has_preview(context) | ||||
| bl_category = "View" | |||||
| # NOTE: this is just a wrapper around the generic GP tools panel | # NOTE: this is just a wrapper around the generic GP Panel | ||||
| # It contains access to some essential tools usually found only in | # But, it should only show up when there are images in the preview region | ||||
| # toolbar, which doesn't exist here... | |||||
| class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel): | class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel): | ||||
| Context not available. | |||||
| SEQUENCER_PT_view_safe_areas, | SEQUENCER_PT_view_safe_areas, | ||||
| SEQUENCER_PT_view_safe_areas_center_cut, | SEQUENCER_PT_view_safe_areas_center_cut, | ||||
| SEQUENCER_PT_grease_pencil, | SEQUENCER_PT_annotation, | ||||
| SEQUENCER_PT_grease_pencil_tools, | |||||
| ) | ) | ||||
| if __name__ == "__main__": # only for live edit. | if __name__ == "__main__": # only for live edit. | ||||
| Context not available. | |||||