Annotations: Add Onion Skin support in VSE
This was removed in previous versions, but can be useful in some situations.
This commit is contained in:
@@ -520,7 +520,7 @@ class AnnotationOnionSkin:
|
|||||||
if gpl is None:
|
if gpl is None:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
gpl = context.active_annotation_layer
|
gpl = context.active_annotation_layer
|
||||||
|
@@ -29,6 +29,7 @@ from bpy.app.translations import (
|
|||||||
)
|
)
|
||||||
from bl_ui.properties_grease_pencil_common import (
|
from bl_ui.properties_grease_pencil_common import (
|
||||||
AnnotationDataPanel,
|
AnnotationDataPanel,
|
||||||
|
AnnotationOnionSkin,
|
||||||
)
|
)
|
||||||
from bl_ui.space_toolsystem_common import (
|
from bl_ui.space_toolsystem_common import (
|
||||||
ToolActivePanelHelper,
|
ToolActivePanelHelper,
|
||||||
@@ -2157,6 +2158,33 @@ class SEQUENCER_PT_annotation(AnnotationDataPanel, SequencerButtonsPanel_Output,
|
|||||||
# But, it should only show up when there are images in the preview region
|
# But, it should only show up when there are images in the preview region
|
||||||
|
|
||||||
|
|
||||||
|
class SEQUENCER_PT_annotation_onion(AnnotationOnionSkin, SequencerButtonsPanel_Output, Panel):
|
||||||
|
bl_space_type = 'SEQUENCE_EDITOR'
|
||||||
|
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):
|
||||||
|
if context.annotation_data_owner is None:
|
||||||
|
return False
|
||||||
|
elif type(context.annotation_data_owner) is bpy.types.Object:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
gpl = context.active_annotation_layer
|
||||||
|
if gpl is None:
|
||||||
|
return False
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel):
|
class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||||
_context_path = "scene.sequence_editor.active_strip"
|
_context_path = "scene.sequence_editor.active_strip"
|
||||||
@@ -2230,6 +2258,7 @@ classes = (
|
|||||||
SEQUENCER_PT_view_safe_areas_center_cut,
|
SEQUENCER_PT_view_safe_areas_center_cut,
|
||||||
|
|
||||||
SEQUENCER_PT_annotation,
|
SEQUENCER_PT_annotation,
|
||||||
|
SEQUENCER_PT_annotation_onion,
|
||||||
)
|
)
|
||||||
|
|
||||||
if __name__ == "__main__": # only for live edit.
|
if __name__ == "__main__": # only for live edit.
|
||||||
|
Reference in New Issue
Block a user