Cleanup: style
[blender.git] / release / scripts / startup / bl_ui / space_sequencer.py
1 # ##### BEGIN GPL LICENSE BLOCK #####
2 #
3 #  This program is free software; you can redistribute it and/or
4 #  modify it under the terms of the GNU General Public License
5 #  as published by the Free Software Foundation; either version 2
6 #  of the License, or (at your option) any later version.
7 #
8 #  This program is distributed in the hope that it will be useful,
9 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 #  GNU General Public License for more details.
12 #
13 #  You should have received a copy of the GNU General Public License
14 #  along with this program; if not, write to the Free Software Foundation,
15 #  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # ##### END GPL LICENSE BLOCK #####
18
19 # <pep8 compliant>
20 import bpy
21 from bpy.types import Header, Menu, Panel
22 from rna_prop_ui import PropertyPanel
23 from .properties_grease_pencil_common import (
24     AnnotationDataPanel,
25     AnnotationOnionSkin,
26     GreasePencilToolsPanel,
27 )
28 from bpy.app.translations import pgettext_iface as iface_
29
30
31 def act_strip(context):
32     try:
33         return context.scene.sequence_editor.active_strip
34     except AttributeError:
35         return None
36
37
38 def sel_sequences(context):
39     try:
40         return len(context.selected_sequences) if context.selected_sequences else 0
41     except AttributeError:
42         return 0
43
44
45 def draw_color_balance(layout, color_balance):
46     box = layout.box()
47     split = box.split(factor=0.35)
48     col = split.column(align=True)
49     col.label(text="Lift:")
50     col.separator()
51     col.separator()
52     col.prop(color_balance, "lift", text="")
53     col.prop(color_balance, "invert_lift", text="Invert", icon='ARROW_LEFTRIGHT')
54     split.template_color_picker(color_balance, "lift", value_slider=True, cubic=True)
55
56     box = layout.box()
57     split = box.split(factor=0.35)
58     col = split.column(align=True)
59     col.label(text="Gamma:")
60     col.separator()
61     col.separator()
62     col.prop(color_balance, "gamma", text="")
63     col.prop(color_balance, "invert_gamma", text="Invert", icon='ARROW_LEFTRIGHT')
64     split.template_color_picker(color_balance, "gamma", value_slider=True, lock_luminosity=True, cubic=True)
65
66     box = layout.box()
67     split = box.split(factor=0.35)
68     col = split.column(align=True)
69     col.label(text="Gain:")
70     col.separator()
71     col.separator()
72     col.prop(color_balance, "gain", text="")
73     col.prop(color_balance, "invert_gain", text="Invert", icon='ARROW_LEFTRIGHT')
74     split.template_color_picker(color_balance, "gain", value_slider=True, lock_luminosity=True, cubic=True)
75
76
77 class SEQUENCER_HT_header(Header):
78     bl_space_type = 'SEQUENCE_EDITOR'
79
80     def draw(self, context):
81         layout = self.layout
82
83         st = context.space_data
84         scene = context.scene
85
86         row = layout.row(align=True)
87         row.template_header()
88
89         layout.prop(st, "view_type", text="")
90
91         SEQUENCER_MT_editor_menus.draw_collapsible(context, layout)
92
93         if st.view_type == 'SEQUENCER':
94             layout.prop(st, "show_backdrop", text="Backdrop")
95
96         layout.separator_spacer()
97
98         layout.template_running_jobs()
99
100         if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
101             layout.separator()
102             layout.operator("sequencer.refresh_all", icon='FILE_REFRESH', text="")
103
104         if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
105             layout.prop(st, "display_mode", text="", icon_only=True)
106
107         if st.view_type != 'SEQUENCER':
108             layout.prop(st, "preview_channels", text="", icon_only=True)
109             layout.prop(st, "display_channel", text="Channel")
110
111             ed = scene.sequence_editor
112             if ed:
113                 row = layout.row(align=True)
114                 row.prop(ed, "show_overlay", text="", icon='GHOST_ENABLED')
115                 if ed.show_overlay:
116                     row.prop(ed, "overlay_frame", text="")
117                     row.prop(ed, "use_overlay_lock", text="", icon='LOCKED')
118
119                     row = layout.row()
120                     row.prop(st, "overlay_type", text="")
121
122         if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
123             gpd = context.gpencil_data
124             tool_settings = context.tool_settings
125
126             # Proportional editing
127             if gpd and gpd.use_stroke_edit_mode:
128                 row = layout.row(align=True)
129                 row.prop(tool_settings, "proportional_edit", icon_only=True)
130                 if tool_settings.proportional_edit != 'DISABLED':
131                     row.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
132
133
134 class SEQUENCER_MT_editor_menus(Menu):
135     bl_idname = "SEQUENCER_MT_editor_menus"
136     bl_label = ""
137
138     def draw(self, context):
139         layout = self.layout
140         st = context.space_data
141
142         layout.menu("SEQUENCER_MT_view")
143
144         if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
145             layout.menu("SEQUENCER_MT_select")
146             layout.menu("SEQUENCER_MT_marker")
147             layout.menu("SEQUENCER_MT_add")
148             layout.menu("SEQUENCER_MT_frame")
149             layout.menu("SEQUENCER_MT_strip")
150
151
152 class SEQUENCER_MT_view_toggle(Menu):
153     bl_label = "View Type"
154
155     def draw(self, context):
156         layout = self.layout
157
158         layout.operator("sequencer.view_toggle").type = 'SEQUENCER'
159         layout.operator("sequencer.view_toggle").type = 'PREVIEW'
160         layout.operator("sequencer.view_toggle").type = 'SEQUENCER_PREVIEW'
161
162
163 class SEQUENCER_MT_view(Menu):
164     bl_label = "View"
165
166     def draw(self, context):
167         layout = self.layout
168
169         st = context.space_data
170         is_preview = st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}
171         is_sequencer_view = st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}
172
173         if st.view_type == 'PREVIEW':
174             # Specifying the REGION_PREVIEW context is needed in preview-only
175             # mode, else the lookup for the shortcut will fail in
176             # wm_keymap_item_find_props() (see #32595).
177             layout.operator_context = 'INVOKE_REGION_PREVIEW'
178         layout.operator("sequencer.properties", icon='MENU_PANEL')
179         layout.operator_context = 'INVOKE_DEFAULT'
180
181         layout.separator()
182
183         if is_sequencer_view:
184             layout.operator_context = 'INVOKE_REGION_WIN'
185             layout.operator("sequencer.view_all", text="View all Sequences")
186             layout.operator("sequencer.view_selected")
187             layout.operator("sequencer.view_frame")
188             layout.operator_context = 'INVOKE_DEFAULT'
189         if is_preview:
190             layout.operator_context = 'INVOKE_REGION_PREVIEW'
191             layout.operator("sequencer.view_all_preview", text="Fit Preview in window")
192
193             layout.separator()
194
195             ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
196
197             for a, b in ratios:
198                 layout.operator(
199                     "sequencer.view_zoom_ratio",
200                     text=iface_("Zoom %d:%d") % (a, b),
201                     translate=False,
202                 ).ratio = a / b
203
204             layout.separator()
205
206             layout.operator_context = 'INVOKE_DEFAULT'
207
208             # # XXX, invokes in the header view
209             # layout.operator("sequencer.view_ghost_border", text="Overlay Border")
210
211         if is_sequencer_view:
212             layout.prop(st, "show_seconds")
213             layout.prop(st, "show_frame_indicator")
214             layout.prop(st, "show_strip_offset")
215
216             layout.prop_menu_enum(st, "waveform_display_type")
217
218         if is_preview:
219             if st.display_mode == 'IMAGE':
220                 layout.prop(st, "show_safe_areas")
221                 layout.prop(st, "show_metadata")
222             elif st.display_mode == 'WAVEFORM':
223                 layout.prop(st, "show_separate_color")
224
225         layout.separator()
226
227         layout.operator("render.opengl", text="Sequence Render", icon='RENDER_STILL').sequencer = True
228         props = layout.operator("render.opengl", text="Sequence Render Animation", icon='RENDER_ANIMATION')
229         props.animation = True
230         props.sequencer = True
231
232         layout.separator()
233
234         layout.menu("INFO_MT_area")
235
236
237 class SEQUENCER_MT_select(Menu):
238     bl_label = "Select"
239
240     def draw(self, context):
241         layout = self.layout
242
243         layout.operator("sequencer.select_all", text="All").action = 'SELECT'
244         layout.operator("sequencer.select_all", text="None").action = 'DESELECT'
245         layout.operator("sequencer.select_all", text="Invert").action = 'INVERT'
246
247         layout.separator()
248
249         layout.operator("sequencer.select_active_side", text="Strips to the Left").side = 'LEFT'
250         layout.operator("sequencer.select_active_side", text="Strips to the Right").side = 'RIGHT'
251         props = layout.operator("sequencer.select", text="All Strips to the Left")
252         props.left_right = 'LEFT'
253         props.linked_time = True
254         props = layout.operator("sequencer.select", text="All Strips to the Right")
255         props.left_right = 'RIGHT'
256         props.linked_time = True
257
258         layout.separator()
259         layout.operator("sequencer.select_handles", text="Surrounding Handles").side = 'BOTH'
260         layout.operator("sequencer.select_handles", text="Left Handle").side = 'LEFT'
261         layout.operator("sequencer.select_handles", text="Right Handle").side = 'RIGHT'
262         layout.separator()
263         layout.operator_menu_enum("sequencer.select_grouped", "type", text="Grouped")
264         layout.operator("sequencer.select_linked")
265         layout.operator("sequencer.select_less")
266         layout.operator("sequencer.select_more")
267
268
269 class SEQUENCER_MT_marker(Menu):
270     bl_label = "Marker"
271
272     def draw(self, context):
273         layout = self.layout
274
275         st = context.space_data
276         is_sequencer_view = st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}
277
278         from .space_time import marker_menu_generic
279         marker_menu_generic(layout)
280
281         if is_sequencer_view:
282             layout.prop(st, "use_marker_sync")
283
284
285 class SEQUENCER_MT_frame(Menu):
286     bl_label = "Frame"
287
288     def draw(self, context):
289         layout = self.layout
290
291         layout.operator("anim.previewrange_clear")
292         layout.operator("anim.previewrange_set")
293
294         layout.separator()
295
296         props = layout.operator("sequencer.strip_jump", text="Jump to Previous Strip")
297         props.next = False
298         props.center = False
299         props = layout.operator("sequencer.strip_jump", text="Jump to Next Strip")
300         props.next = True
301         props.center = False
302
303         layout.separator()
304
305         props = layout.operator("sequencer.strip_jump", text="Jump to Previous Strip (Center)")
306         props.next = False
307         props.center = True
308         props = layout.operator("sequencer.strip_jump", text="Jump to Next Strip (Center)")
309         props.next = True
310         props.center = True
311
312
313 class SEQUENCER_MT_add(Menu):
314     bl_label = "Add"
315
316     def draw(self, context):
317
318         layout = self.layout
319         layout.operator_context = 'INVOKE_REGION_WIN'
320
321         if len(bpy.data.scenes) > 10:
322             layout.operator_context = 'INVOKE_DEFAULT'
323             layout.operator("sequencer.scene_strip_add", text="Scene...", icon='SCENE_DATA')
324         elif len(bpy.data.scenes) > 1:
325             layout.operator_menu_enum("sequencer.scene_strip_add", "scene", text="Scene", icon='SCENE_DATA')
326         else:
327             layout.menu("SEQUENCER_MT_add_empty", text="Scene", icon='SCENE_DATA')
328
329         if len(bpy.data.movieclips) > 10:
330             layout.operator_context = 'INVOKE_DEFAULT'
331             layout.operator("sequencer.movieclip_strip_add", text="Clip...", icon='CLIP')
332         elif len(bpy.data.movieclips) > 1:
333             layout.operator_menu_enum("sequencer.movieclip_strip_add", "clip", text="Clip", icon='CLIP')
334         else:
335             layout.menu("SEQUENCER_MT_add_empty", text="Clip", icon='CLIP')
336
337         if len(bpy.data.masks) > 10:
338             layout.operator_context = 'INVOKE_DEFAULT'
339             layout.operator("sequencer.mask_strip_add", text="Mask...", icon='MOD_MASK')
340         elif len(bpy.data.masks) > 1:
341             layout.operator_menu_enum("sequencer.mask_strip_add", "mask", text="Mask", icon='MOD_MASK')
342         else:
343             layout.menu("SEQUENCER_MT_add_empty", text="Mask", icon='MOD_MASK')
344
345         layout.separator()
346
347         layout.operator("sequencer.movie_strip_add", text="Movie", icon='FILE_MOVIE')
348         layout.operator("sequencer.sound_strip_add", text="Sound", icon='FILE_SOUND')
349         layout.operator("sequencer.image_strip_add", text="Image/Sequence", icon='FILE_IMAGE')
350
351         layout.separator()
352
353         layout.operator_context = 'INVOKE_REGION_WIN'
354         layout.operator("sequencer.effect_strip_add", text="Color", icon='COLOR').type = 'COLOR'
355         layout.operator("sequencer.effect_strip_add", text="Text", icon='FONT_DATA').type = 'TEXT'
356
357         layout.separator()
358
359         layout.operator("sequencer.effect_strip_add", text="Adjustment Layer", icon='COLOR').type = 'ADJUSTMENT'
360
361         layout.operator_context = 'INVOKE_DEFAULT'
362         layout.menu("SEQUENCER_MT_add_effect")
363
364         col = layout.column()
365         col.menu("SEQUENCER_MT_add_transitions")
366         col.enabled = sel_sequences(context) >= 2
367
368
369 class SEQUENCER_MT_add_empty(Menu):
370     bl_label = "Empty"
371
372     def draw(self, context):
373         layout = self.layout
374
375         layout.label(text="No Items Available")
376
377
378 class SEQUENCER_MT_add_transitions(Menu):
379     bl_label = "Transitions"
380
381     def draw(self, context):
382
383         layout = self.layout
384
385         col = layout.column()
386         col.operator("sequencer.effect_strip_add", text="Cross").type = 'CROSS'
387         col.operator("sequencer.effect_strip_add", text="Gamma Cross").type = 'GAMMA_CROSS'
388
389         col.separator()
390
391         col.operator("sequencer.effect_strip_add", text="Wipe").type = 'WIPE'
392         col.enabled = sel_sequences(context) >= 2
393
394
395 class SEQUENCER_MT_add_effect(Menu):
396     bl_label = "Effect Strip"
397
398     def draw(self, context):
399
400         layout = self.layout
401         layout.operator_context = 'INVOKE_REGION_WIN'
402
403         col = layout.column()
404         col.operator("sequencer.effect_strip_add", text="Add").type = 'ADD'
405         col.operator("sequencer.effect_strip_add", text="Subtract").type = 'SUBTRACT'
406         col.operator("sequencer.effect_strip_add", text="Multiply").type = 'MULTIPLY'
407         col.operator("sequencer.effect_strip_add", text="Over Drop").type = 'OVER_DROP'
408         col.operator("sequencer.effect_strip_add", text="Alpha Over").type = 'ALPHA_OVER'
409         col.operator("sequencer.effect_strip_add", text="Alpha Under").type = 'ALPHA_UNDER'
410         col.operator("sequencer.effect_strip_add", text="Color Mix").type = 'COLORMIX'
411         col.enabled = sel_sequences(context) >= 2
412
413         layout.separator()
414
415         layout.operator("sequencer.effect_strip_add", text="Multicam Selector").type = 'MULTICAM'
416
417         layout.separator()
418
419         col = layout.column()
420         col.operator("sequencer.effect_strip_add", text="Transform").type = 'TRANSFORM'
421         col.operator("sequencer.effect_strip_add", text="Speed Control").type = 'SPEED'
422
423         col.separator()
424
425         col.operator("sequencer.effect_strip_add", text="Glow").type = 'GLOW'
426         col.operator("sequencer.effect_strip_add", text="Gaussian Blur").type = 'GAUSSIAN_BLUR'
427         col.enabled = sel_sequences(context) != 0
428
429
430 class SEQUENCER_MT_strip_transform(Menu):
431     bl_label = "Transform"
432
433     def draw(self, context):
434         layout = self.layout
435
436         layout.operator("transform.transform", text="Move").mode = 'TRANSLATION'
437         layout.operator("transform.transform", text="Move/Extend from Frame").mode = 'TIME_EXTEND'
438         layout.operator("sequencer.slip", text="Slip Strip Contents")
439
440         layout.separator()
441         layout.operator_menu_enum("sequencer.swap", "side")
442
443         layout.separator()
444         layout.operator("sequencer.gap_remove").all = False
445         layout.operator("sequencer.gap_insert")
446
447
448 class SEQUENCER_MT_strip_input(Menu):
449     bl_label = "Inputs"
450
451     def draw(self, context):
452         layout = self.layout
453         strip = act_strip(context)
454
455         layout.operator("sequencer.reload", text="Reload Strips")
456         layout.operator("sequencer.reload", text="Reload Strips and Adjust Length").adjust_length = True
457         prop = layout.operator("sequencer.change_path", text="Change Path/Files")
458         layout.operator("sequencer.swap_data", text="Swap Data")
459
460         if strip:
461             stype = strip.type
462
463             if stype == 'IMAGE':
464                 prop.filter_image = True
465             elif stype == 'MOVIE':
466                 prop.filter_movie = True
467             elif stype == 'SOUND':
468                 prop.filter_sound = True
469
470
471 class SEQUENCER_MT_strip_lock_mute(Menu):
472     bl_label = "Lock/Mute"
473
474     def draw(self, context):
475         layout = self.layout
476
477         layout.operator("sequencer.lock", icon='LOCKED')
478         layout.operator("sequencer.unlock")
479
480         layout.separator()
481
482         layout.operator("sequencer.mute").unselected = False
483         layout.operator("sequencer.unmute").unselected = False
484         layout.operator("sequencer.mute", text="Mute Unselected Strips").unselected = True
485
486
487 class SEQUENCER_MT_strip(Menu):
488     bl_label = "Strip"
489
490     def draw(self, context):
491         layout = self.layout
492
493         layout.operator_context = 'INVOKE_REGION_WIN'
494
495         layout.separator()
496         layout.menu("SEQUENCER_MT_strip_transform")
497         layout.operator("sequencer.snap")
498         layout.operator("sequencer.offset_clear")
499
500         layout.separator()
501         layout.operator("sequencer.copy", text="Copy")
502         layout.operator("sequencer.paste", text="Paste")
503         layout.operator("sequencer.duplicate_move")
504         layout.operator("sequencer.delete", text="Delete...")
505
506         layout.separator()
507         layout.operator("sequencer.cut", text="Cut (Hard) at frame").type = 'HARD'
508         layout.operator("sequencer.cut", text="Cut (Soft) at frame").type = 'SOFT'
509
510         layout.separator()
511         layout.operator("sequencer.deinterlace_selected_movies")
512         layout.operator("sequencer.rebuild_proxy")
513
514         strip = act_strip(context)
515
516         if strip:
517             stype = strip.type
518
519             if stype in {
520                     'CROSS', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
521                     'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP', 'WIPE', 'GLOW',
522                     'TRANSFORM', 'COLOR', 'SPEED', 'MULTICAM', 'ADJUSTMENT',
523                     'GAUSSIAN_BLUR', 'TEXT',
524             }:
525                 layout.separator()
526                 layout.operator_menu_enum("sequencer.change_effect_input", "swap")
527                 layout.operator_menu_enum("sequencer.change_effect_type", "type")
528                 layout.operator("sequencer.reassign_inputs")
529                 layout.operator("sequencer.swap_inputs")
530             elif stype in {'IMAGE', 'MOVIE'}:
531                 layout.separator()
532                 layout.operator("sequencer.rendersize")
533                 layout.operator("sequencer.images_separate")
534             elif stype == 'SOUND':
535                 layout.separator()
536                 layout.operator("sequencer.crossfade_sounds")
537             elif stype == 'META':
538                 layout.separator()
539                 layout.operator("sequencer.meta_separate")
540
541         layout.separator()
542         layout.operator("sequencer.meta_make")
543
544         layout.separator()
545         layout.menu("SEQUENCER_MT_strip_input")
546
547         layout.separator()
548         layout.menu("SEQUENCER_MT_strip_lock_mute")
549
550
551 class SequencerButtonsPanel:
552     bl_space_type = 'SEQUENCE_EDITOR'
553     bl_region_type = 'UI'
554
555     @staticmethod
556     def has_sequencer(context):
557         return (context.space_data.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'})
558
559     @classmethod
560     def poll(cls, context):
561         return cls.has_sequencer(context) and (act_strip(context) is not None)
562
563
564 class SequencerButtonsPanel_Output:
565     bl_space_type = 'SEQUENCE_EDITOR'
566     bl_region_type = 'UI'
567
568     @staticmethod
569     def has_preview(context):
570         st = context.space_data
571         return (st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}) or st.show_backdrop
572
573     @classmethod
574     def poll(cls, context):
575         return cls.has_preview(context)
576
577
578 class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
579     bl_label = "Edit Strip"
580     bl_category = "Strip"
581
582     def draw(self, context):
583         layout = self.layout
584
585         scene = context.scene
586         frame_current = scene.frame_current
587         strip = act_strip(context)
588
589         split = layout.split(factor=0.25)
590         split.label(text="Name:")
591         split.prop(strip, "name", text="")
592
593         split = layout.split(factor=0.25)
594         split.label(text="Type:")
595         split.prop(strip, "type", text="")
596
597         if strip.type != 'SOUND':
598             split = layout.split(factor=0.25)
599             split.label(text="Blend:")
600             split.prop(strip, "blend_type", text="")
601
602             row = layout.row(align=True)
603             sub = row.row(align=True)
604             sub.active = (not strip.mute)
605             sub.prop(strip, "blend_alpha", text="Opacity", slider=True)
606             row.prop(strip, "mute", toggle=True, icon_only=True)
607
608         else:
609             row = layout.row()
610             row.prop(strip, "mute", toggle=True, icon_only=True, icon='MUTE_IPO_OFF')
611
612         col = layout.column(align=True)
613         row = col.row(align=True)
614
615         row_sub = row.row(align=True)
616         row_sub.enabled = not strip.lock
617         row_sub.prop(strip, "channel")
618         row.prop(strip, "lock", toggle=True, icon_only=True)
619
620         sub = col.column(align=True)
621         sub.enabled = not strip.lock
622         sub.prop(strip, "frame_start")
623         sub.prop(strip, "frame_final_duration")
624
625         col = layout.column(align=True)
626         row = col.row(align=True)
627         row.label(text=iface_("Final Length: %s") % bpy.utils.smpte_from_frame(strip.frame_final_duration),
628                   translate=False)
629         row = col.row(align=True)
630         row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_duration)
631         row.label(text=iface_("Playhead: %d") % (frame_current - strip.frame_start), translate=False)
632
633         col.label(text=iface_("Frame Offset %d:%d") % (strip.frame_offset_start, strip.frame_offset_end),
634                   translate=False)
635         col.label(text=iface_("Frame Still %d:%d") % (strip.frame_still_start, strip.frame_still_end), translate=False)
636
637         elem = False
638
639         if strip.type == 'IMAGE':
640             elem = strip.strip_elem_from_frame(frame_current)
641         elif strip.type == 'MOVIE':
642             elem = strip.elements[0]
643
644         if elem and elem.orig_width > 0 and elem.orig_height > 0:
645             col.label(text=iface_("Original Dimension: %dx%d") % (elem.orig_width, elem.orig_height), translate=False)
646         else:
647             col.label(text="Original Dimension: None")
648
649
650 class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
651     bl_label = "Effect Strip"
652     bl_category = "Strip"
653
654     @classmethod
655     def poll(cls, context):
656         if not cls.has_sequencer(context):
657             return False
658
659         strip = act_strip(context)
660         if not strip:
661             return False
662
663         return strip.type in {
664             'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
665             'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
666             'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED',
667             'MULTICAM', 'GAUSSIAN_BLUR', 'TEXT', 'COLORMIX'
668         }
669
670     def draw(self, context):
671         layout = self.layout
672
673         strip = act_strip(context)
674
675         if strip.input_count > 0:
676             col = layout.column()
677             col.enabled = False
678             col.prop(strip, "input_1")
679             if strip.input_count > 1:
680                 col.prop(strip, "input_2")
681
682         if strip.type == 'COLOR':
683             layout.prop(strip, "color")
684
685         elif strip.type == 'WIPE':
686             col = layout.column()
687             col.prop(strip, "transition_type")
688             col.label(text="Direction:")
689             col.row().prop(strip, "direction", expand=True)
690
691             col = layout.column()
692             col.prop(strip, "blur_width", slider=True)
693             if strip.transition_type in {'SINGLE', 'DOUBLE'}:
694                 col.prop(strip, "angle")
695
696         elif strip.type == 'GLOW':
697             flow = layout.column_flow()
698             flow.prop(strip, "threshold", slider=True)
699             flow.prop(strip, "clamp", slider=True)
700             flow.prop(strip, "boost_factor")
701             flow.prop(strip, "blur_radius")
702
703             row = layout.row()
704             row.prop(strip, "quality", slider=True)
705             row.prop(strip, "use_only_boost")
706
707         elif strip.type == 'SPEED':
708             layout.prop(strip, "use_default_fade", text="Stretch to input strip length")
709             if not strip.use_default_fade:
710                 layout.prop(strip, "use_as_speed")
711                 if strip.use_as_speed:
712                     layout.prop(strip, "speed_factor")
713                 else:
714                     layout.prop(strip, "speed_factor", text="Frame Number")
715                     layout.prop(strip, "scale_to_length")
716
717         elif strip.type == 'TRANSFORM':
718             layout = self.layout
719             col = layout.column()
720
721             col.prop(strip, "interpolation")
722             col.prop(strip, "translation_unit")
723             col = layout.column(align=True)
724             col.label(text="Position:")
725             row = col.row(align=True)
726             row.prop(strip, "translate_start_x", text="X")
727             row.prop(strip, "translate_start_y", text="Y")
728
729             layout.separator()
730
731             col = layout.column(align=True)
732             col.prop(strip, "use_uniform_scale")
733             if strip.use_uniform_scale:
734                 col = layout.column(align=True)
735                 col.prop(strip, "scale_start_x", text="Scale")
736             else:
737                 col = layout.column(align=True)
738                 col.label(text="Scale:")
739                 row = col.row(align=True)
740                 row.prop(strip, "scale_start_x", text="X")
741                 row.prop(strip, "scale_start_y", text="Y")
742
743             layout.separator()
744
745             col = layout.column(align=True)
746             col.label(text="Rotation:")
747             col.prop(strip, "rotation_start", text="Rotation")
748
749         elif strip.type == 'MULTICAM':
750             col = layout.column(align=True)
751             strip_channel = strip.channel
752
753             col.prop(strip, "multicam_source", text="Source Channel")
754
755             # The multicam strip needs at least 2 strips to be useful
756             if strip_channel > 2:
757                 BT_ROW = 4
758
759                 col.label(text="Cut To:")
760                 row = col.row()
761
762                 for i in range(1, strip_channel):
763                     if (i % BT_ROW) == 1:
764                         row = col.row(align=True)
765
766                     # Workaround - .enabled has to have a separate UI block to work
767                     if i == strip.multicam_source:
768                         sub = row.row(align=True)
769                         sub.enabled = False
770                         sub.operator("sequencer.cut_multicam", text=f"{i:d}").camera = i
771                     else:
772                         sub_1 = row.row(align=True)
773                         sub_1.enabled = True
774                         sub_1.operator("sequencer.cut_multicam", text=f"{i:d}").camera = i
775
776                 if strip.channel > BT_ROW and (strip_channel - 1) % BT_ROW:
777                     for i in range(strip.channel, strip_channel + ((BT_ROW + 1 - strip_channel) % BT_ROW)):
778                         row.label(text="")
779             else:
780                 col.separator()
781                 col.label(text="Two or more channels are needed below this strip", icon='INFO')
782
783         elif strip.type == 'TEXT':
784             col = layout.column()
785             col.prop(strip, "text")
786             col.prop(strip, "font_size")
787
788             row = col.row()
789             row.prop(strip, "color")
790             row = col.row()
791             row.prop(strip, "use_shadow")
792             rowsub = row.row()
793             rowsub.active = strip.use_shadow
794             rowsub.prop(strip, "shadow_color", text="")
795
796             col.prop(strip, "align_x")
797             col.prop(strip, "align_y")
798             col.label(text="Location")
799             row = col.row(align=True)
800             row.prop(strip, "location", text="")
801             col.prop(strip, "wrap_width")
802             layout.operator("sequencer.export_subtitles", icon='EXPORT')
803
804         col = layout.column(align=True)
805         if strip.type == 'SPEED':
806             col.prop(strip, "multiply_speed")
807         elif strip.type in {'CROSS', 'GAMMA_CROSS', 'WIPE', 'ALPHA_OVER', 'ALPHA_UNDER', 'OVER_DROP'}:
808             col.prop(strip, "use_default_fade", text="Default fade")
809             if not strip.use_default_fade:
810                 col.prop(strip, "effect_fader", text="Effect Fader")
811         elif strip.type == 'GAUSSIAN_BLUR':
812             row = col.row(align=True)
813             row.prop(strip, "size_x")
814             row.prop(strip, "size_y")
815         elif strip.type == 'COLORMIX':
816             split = layout.split(factor=0.35)
817             split.label(text="Blend Mode:")
818             split.prop(strip, "blend_effect", text="")
819             row = layout.row(align=True)
820             row.prop(strip, "factor", slider=True)
821
822
823 class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
824     bl_label = "Strip Input"
825     bl_category = "Strip"
826
827     @classmethod
828     def poll(cls, context):
829         if not cls.has_sequencer(context):
830             return False
831
832         strip = act_strip(context)
833         if not strip:
834             return False
835
836         return strip.type in {
837             'MOVIE', 'IMAGE', 'SCENE', 'MOVIECLIP', 'META',
838             'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
839             'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
840             'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
841             'MULTICAM', 'SPEED', 'ADJUSTMENT', 'COLORMIX'
842         }
843
844     def draw(self, context):
845         layout = self.layout
846         scene = context.scene
847
848         strip = act_strip(context)
849
850         seq_type = strip.type
851
852         # draw a filename if we have one
853         if seq_type == 'IMAGE':
854             split = layout.split(factor=0.2)
855             split.label(text="Path:")
856             split.prop(strip, "directory", text="")
857
858             # Current element for the filename
859
860             elem = strip.strip_elem_from_frame(scene.frame_current)
861             if elem:
862                 split = layout.split(factor=0.2)
863                 split.label(text="File:")
864                 split.prop(elem, "filename", text="")  # strip.elements[0] could be a fallback
865
866             split = layout.split(factor=0.4)
867             split.label(text="Color Space:")
868             split.prop(strip.colorspace_settings, "name", text="")
869
870             split = layout.split(factor=0.4)
871             split.label(text="Alpha:")
872             split.prop(strip, "alpha_mode", text="")
873
874             layout.operator("sequencer.change_path", icon='FILEBROWSER').filter_image = True
875
876         elif seq_type == 'MOVIE':
877             split = layout.split(factor=0.2)
878             split.label(text="Path:")
879             split.prop(strip, "filepath", text="")
880
881             split = layout.split(factor=0.4)
882             split.label(text="Color Space:")
883             split.prop(strip.colorspace_settings, "name", text="")
884
885             layout.prop(strip, "mpeg_preseek")
886             layout.prop(strip, "stream_index")
887
888         layout.prop(strip, "use_translation", text="Image Offset")
889         if strip.use_translation:
890             row = layout.row(align=True)
891             row.prop(strip.transform, "offset_x", text="X")
892             row.prop(strip.transform, "offset_y", text="Y")
893
894         layout.prop(strip, "use_crop", text="Image Crop")
895         if strip.use_crop:
896             col = layout.column(align=True)
897             col.prop(strip.crop, "max_y")
898             row = col.row(align=True)
899             row.prop(strip.crop, "min_x")
900             row.prop(strip.crop, "max_x")
901             col.prop(strip.crop, "min_y")
902
903         if not isinstance(strip, bpy.types.EffectSequence):
904             layout.label(text="Trim Duration (hard):")
905             row = layout.row(align=True)
906             row.prop(strip, "animation_offset_start", text="Start")
907             row.prop(strip, "animation_offset_end", text="End")
908
909         layout.label(text="Trim Duration (soft):")
910         row = layout.row(align=True)
911         row.prop(strip, "frame_offset_start", text="Start")
912         row.prop(strip, "frame_offset_end", text="End")
913
914         if scene.render.use_multiview and seq_type in {'IMAGE', 'MOVIE'}:
915             layout.prop(strip, "use_multiview")
916
917             col = layout.column()
918             col.active = strip.use_multiview
919
920             col.label(text="Views Format:")
921             col.row().prop(strip, "views_format", expand=True)
922
923             box = col.box()
924             box.active = strip.views_format == 'STEREO_3D'
925             box.template_image_stereo_3d(strip.stereo_3d_format)
926
927
928 class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
929     bl_label = "Sound"
930     bl_category = "Strip"
931
932     @classmethod
933     def poll(cls, context):
934         if not cls.has_sequencer(context):
935             return False
936
937         strip = act_strip(context)
938         if not strip:
939             return False
940
941         return (strip.type == 'SOUND')
942
943     def draw(self, context):
944         layout = self.layout
945
946         st = context.space_data
947         strip = act_strip(context)
948         sound = strip.sound
949
950         layout.template_ID(strip, "sound", open="sound.open")
951         if sound is not None:
952             layout.prop(sound, "filepath", text="")
953
954             row = layout.row()
955             if sound.packed_file:
956                 row.operator("sound.unpack", icon='PACKAGE', text="Unpack")
957             else:
958                 row.operator("sound.pack", icon='UGLYPACKAGE', text="Pack")
959
960             row.prop(sound, "use_memory_cache")
961
962             layout.prop(sound, "use_mono")
963
964         if st.waveform_display_type == 'DEFAULT_WAVEFORMS':
965             layout.prop(strip, "show_waveform")
966
967         col = layout.column(align=True)
968         col.prop(strip, "volume")
969         col.prop(strip, "pitch")
970         col.prop(strip, "pan")
971
972         col = layout.column(align=True)
973         col.label(text="Trim Duration (hard):")
974         row = layout.row(align=True)
975         row.prop(strip, "animation_offset_start", text="Start")
976         row.prop(strip, "animation_offset_end", text="End")
977
978         col = layout.column(align=True)
979         col.label(text="Trim Duration (soft):")
980         row = layout.row(align=True)
981         row.prop(strip, "frame_offset_start", text="Start")
982         row.prop(strip, "frame_offset_end", text="End")
983
984
985 class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
986     bl_label = "Scene"
987     bl_category = "Strip"
988
989     @classmethod
990     def poll(cls, context):
991         if not cls.has_sequencer(context):
992             return False
993
994         strip = act_strip(context)
995         if not strip:
996             return False
997
998         return (strip.type == 'SCENE')
999
1000     def draw(self, context):
1001         layout = self.layout
1002
1003         strip = act_strip(context)
1004
1005         layout.template_ID(strip, "scene")
1006
1007         scene = strip.scene
1008         layout.prop(strip, "use_sequence")
1009
1010         if not strip.use_sequence:
1011             layout.label(text="Camera Override")
1012             layout.template_ID(strip, "scene_camera")
1013
1014             layout.prop(strip, "use_grease_pencil", text="Show Grease Pencil")
1015
1016         if scene:
1017             layout.prop(scene, "audio_volume", text="Audio Volume")
1018
1019         if not strip.use_sequence:
1020             if scene:
1021                 # Warning, this is not a good convention to follow.
1022                 # Expose here because setting the alpha from the 'Render' menu is very inconvenient.
1023                 layout.label(text="Preview")
1024                 layout.prop(scene.render, "alpha_mode")
1025
1026         if scene:
1027             sta = scene.frame_start
1028             end = scene.frame_end
1029             layout.label(text=iface_("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1), translate=False)
1030
1031
1032 class SEQUENCER_PT_mask(SequencerButtonsPanel, Panel):
1033     bl_label = "Mask"
1034     bl_category = "Strip"
1035
1036     @classmethod
1037     def poll(cls, context):
1038         if not cls.has_sequencer(context):
1039             return False
1040
1041         strip = act_strip(context)
1042         if not strip:
1043             return False
1044
1045         return (strip.type == 'MASK')
1046
1047     def draw(self, context):
1048         layout = self.layout
1049
1050         strip = act_strip(context)
1051
1052         layout.template_ID(strip, "mask")
1053
1054         mask = strip.mask
1055
1056         if mask:
1057             sta = mask.frame_start
1058             end = mask.frame_end
1059             layout.label(text=iface_("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1), translate=False)
1060
1061
1062 class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
1063     bl_label = "Filter"
1064     bl_category = "Strip"
1065
1066     @classmethod
1067     def poll(cls, context):
1068         if not cls.has_sequencer(context):
1069             return False
1070
1071         strip = act_strip(context)
1072         if not strip:
1073             return False
1074
1075         return strip.type in {
1076             'MOVIE', 'IMAGE', 'SCENE', 'MOVIECLIP', 'MASK',
1077             'META', 'ADD', 'SUBTRACT', 'ALPHA_OVER',
1078             'ALPHA_UNDER', 'CROSS', 'GAMMA_CROSS', 'MULTIPLY',
1079             'OVER_DROP', 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
1080             'MULTICAM', 'SPEED', 'ADJUSTMENT', 'COLORMIX'
1081         }
1082
1083     def draw(self, context):
1084         layout = self.layout
1085
1086         strip = act_strip(context)
1087
1088         col = layout.column()
1089         col.label(text="Video:")
1090         col.prop(strip, "strobe")
1091
1092         if strip.type == 'MOVIECLIP':
1093             col = layout.column()
1094             col.label(text="Tracker:")
1095             col.prop(strip, "stabilize2d")
1096
1097             col = layout.column()
1098             col.label(text="Distortion:")
1099             col.prop(strip, "undistort")
1100
1101         split = layout.split(factor=0.6)
1102         col = split.column()
1103         col.prop(strip, "use_reverse_frames", text="Reverse")
1104         col.prop(strip, "use_deinterlace")
1105
1106         col = split.column()
1107         col.prop(strip, "use_flip_x", text="X Flip")
1108         col.prop(strip, "use_flip_y", text="Y Flip")
1109
1110         layout.label(text="Color:")
1111         col = layout.column(align=True)
1112         col.prop(strip, "color_saturation", text="Saturation")
1113         col.prop(strip, "color_multiply", text="Multiply")
1114         layout.prop(strip, "use_float", text="Convert to Float")
1115
1116
1117 class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
1118     bl_label = "Proxy/Timecode"
1119     bl_category = "Strip"
1120
1121     @classmethod
1122     def poll(cls, context):
1123         if not cls.has_sequencer(context):
1124             return False
1125
1126         strip = act_strip(context)
1127         if not strip:
1128             return False
1129
1130         return strip.type in {'MOVIE', 'IMAGE', 'SCENE', 'META', 'MULTICAM'}
1131
1132     def draw_header(self, context):
1133         strip = act_strip(context)
1134
1135         self.layout.prop(strip, "use_proxy", text="")
1136
1137     def draw(self, context):
1138         layout = self.layout
1139
1140         ed = context.scene.sequence_editor
1141
1142         strip = act_strip(context)
1143
1144         if strip.proxy:
1145             proxy = strip.proxy
1146
1147             flow = layout.column_flow()
1148             flow.prop(ed, "proxy_storage", text="Storage")
1149             if ed.proxy_storage == 'PROJECT':
1150                 flow.prop(ed, "proxy_dir", text="Directory")
1151             else:
1152                 flow.prop(proxy, "use_proxy_custom_directory")
1153                 flow.prop(proxy, "use_proxy_custom_file")
1154
1155                 if proxy.use_proxy_custom_directory and not proxy.use_proxy_custom_file:
1156                     flow.prop(proxy, "directory")
1157                 if proxy.use_proxy_custom_file:
1158                     flow.prop(proxy, "filepath")
1159
1160             row = layout.row(align=True)
1161             row.prop(strip.proxy, "build_25", toggle=True)
1162             row.prop(strip.proxy, "build_50", toggle=True)
1163             row.prop(strip.proxy, "build_75", toggle=True)
1164             row.prop(strip.proxy, "build_100", toggle=True)
1165
1166             layout.prop(proxy, "use_overwrite")
1167
1168             col = layout.column()
1169             col.prop(proxy, "quality", text="Build JPEG Quality")
1170
1171             if strip.type == 'MOVIE':
1172                 col = layout.column()
1173                 col.label(text="Use timecode index:")
1174
1175                 col.prop(proxy, "timecode")
1176
1177         col = layout.column()
1178         col.operator("sequencer.enable_proxies")
1179         col.operator("sequencer.rebuild_proxy")
1180
1181
1182 class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
1183     bl_label = "Scene Preview/Render"
1184     bl_space_type = 'SEQUENCE_EDITOR'
1185     bl_region_type = 'UI'
1186     bl_category = "Strip"
1187
1188     def draw(self, context):
1189         layout = self.layout
1190
1191         render = context.scene.render
1192
1193         col = layout.column()
1194         col.prop(render, "sequencer_gl_preview", text="")
1195
1196         row = col.row()
1197         row.active = render.sequencer_gl_preview == 'SOLID'
1198         row.prop(render, "use_sequencer_gl_textured_solid")
1199
1200         col.prop(render, "use_sequencer_gl_dof")
1201
1202
1203 class SEQUENCER_PT_view(SequencerButtonsPanel_Output, Panel):
1204     bl_label = "View Settings"
1205     bl_category = "Strip"
1206
1207     def draw(self, context):
1208         layout = self.layout
1209
1210         st = context.space_data
1211
1212         col = layout.column()
1213         if st.display_mode == 'IMAGE':
1214             col.prop(st, "show_overexposed")
1215             col.separator()
1216
1217         elif st.display_mode == 'WAVEFORM':
1218             col.prop(st, "show_separate_color")
1219
1220         col = layout.column()
1221         col.separator()
1222         col.prop(st, "proxy_render_size")
1223
1224
1225 class SEQUENCER_PT_view_safe_areas(SequencerButtonsPanel_Output, Panel):
1226     bl_label = "Safe Areas"
1227     bl_category = "Strip"
1228     bl_options = {'DEFAULT_CLOSED'}
1229
1230     @classmethod
1231     def poll(cls, context):
1232         st = context.space_data
1233         is_preview = st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}
1234         return is_preview and (st.display_mode == 'IMAGE')
1235
1236     def draw_header(self, context):
1237         st = context.space_data
1238
1239         self.layout.prop(st, "show_safe_areas", text="")
1240
1241     def draw(self, context):
1242         from .properties_data_camera import draw_display_safe_settings
1243
1244         layout = self.layout
1245         st = context.space_data
1246         safe_data = context.scene.safe_areas
1247
1248         draw_display_safe_settings(layout, safe_data, st)
1249
1250
1251 class SEQUENCER_PT_modifiers(SequencerButtonsPanel, Panel):
1252     bl_label = "Modifiers"
1253     bl_category = "Modifiers"
1254
1255     def draw(self, context):
1256         layout = self.layout
1257
1258         strip = act_strip(context)
1259         ed = context.scene.sequence_editor
1260
1261         layout.prop(strip, "use_linear_modifiers")
1262
1263         layout.operator_menu_enum("sequencer.strip_modifier_add", "type")
1264         layout.operator("sequencer.strip_modifier_copy")
1265
1266         for mod in strip.modifiers:
1267             box = layout.box()
1268
1269             row = box.row()
1270             row.prop(mod, "show_expanded", text="", emboss=False)
1271             row.prop(mod, "name", text="")
1272
1273             row.prop(mod, "mute", text="")
1274
1275             sub = row.row(align=True)
1276             props = sub.operator("sequencer.strip_modifier_move", text="", icon='TRIA_UP')
1277             props.name = mod.name
1278             props.direction = 'UP'
1279             props = sub.operator("sequencer.strip_modifier_move", text="", icon='TRIA_DOWN')
1280             props.name = mod.name
1281             props.direction = 'DOWN'
1282
1283             row.operator("sequencer.strip_modifier_remove", text="", icon='X', emboss=False).name = mod.name
1284
1285             if mod.show_expanded:
1286                 row = box.row()
1287                 row.prop(mod, "input_mask_type", expand=True)
1288
1289                 if mod.input_mask_type == 'STRIP':
1290                     sequences_object = ed
1291                     if ed.meta_stack:
1292                         sequences_object = ed.meta_stack[-1]
1293                     box.prop_search(mod, "input_mask_strip", sequences_object, "sequences", text="Mask")
1294                 else:
1295                     box.prop(mod, "input_mask_id")
1296                     row = box.row()
1297                     row.prop(mod, "mask_time", expand=True)
1298
1299                 if mod.type == 'COLOR_BALANCE':
1300                     box.prop(mod, "color_multiply")
1301                     draw_color_balance(box, mod.color_balance)
1302                 elif mod.type == 'CURVES':
1303                     box.template_curve_mapping(mod, "curve_mapping", type='COLOR', show_tone=True)
1304                 elif mod.type == 'HUE_CORRECT':
1305                     box.template_curve_mapping(mod, "curve_mapping", type='HUE')
1306                 elif mod.type == 'BRIGHT_CONTRAST':
1307                     col = box.column()
1308                     col.prop(mod, "bright")
1309                     col.prop(mod, "contrast")
1310                 elif mod.type == 'WHITE_BALANCE':
1311                     col = box.column()
1312                     col.prop(mod, "white_value")
1313                 elif mod.type == 'TONEMAP':
1314                     col = box.column()
1315                     col.prop(mod, "tonemap_type")
1316                     if mod.tonemap_type == 'RD_PHOTORECEPTOR':
1317                         col.prop(mod, "intensity")
1318                         col.prop(mod, "contrast")
1319                         col.prop(mod, "adaptation")
1320                         col.prop(mod, "correction")
1321                     elif mod.tonemap_type == 'RH_SIMPLE':
1322                         col.prop(mod, "key")
1323                         col.prop(mod, "offset")
1324                         col.prop(mod, "gamma")
1325
1326
1327 class SEQUENCER_PT_grease_pencil(AnnotationDataPanel, SequencerButtonsPanel_Output, Panel):
1328     bl_space_type = 'SEQUENCE_EDITOR'
1329     bl_region_type = 'UI'
1330     bl_category = "Strip"
1331
1332     # NOTE: this is just a wrapper around the generic GP Panel
1333     # But, it should only show up when there are images in the preview region
1334
1335
1336 class SEQUENCER_PT_annotation_onion(AnnotationOnionSkin, SequencerButtonsPanel_Output, Panel):
1337     bl_space_type = 'SEQUENCE_EDITOR'
1338     bl_region_type = 'UI'
1339     bl_category = "Strip"
1340     bl_parent_id = 'SEQUENCER_PT_grease_pencil'
1341
1342     # NOTE: this is just a wrapper around the generic GP Panel
1343     # But, it should only show up when there are images in the preview region
1344
1345
1346 class SEQUENCER_PT_grease_pencil_tools(GreasePencilToolsPanel, SequencerButtonsPanel_Output, Panel):
1347     bl_space_type = 'SEQUENCE_EDITOR'
1348     bl_region_type = 'UI'
1349     bl_category = "Strip"
1350
1351     # NOTE: this is just a wrapper around the generic GP tools panel
1352     # It contains access to some essential tools usually found only in
1353     # toolbar, which doesn't exist here...
1354
1355
1356 class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel):
1357     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
1358     _context_path = "scene.sequence_editor.active_strip"
1359     _property_type = (bpy.types.Sequence,)
1360     bl_category = "Strip"
1361
1362
1363 classes = (
1364     SEQUENCER_HT_header,
1365     SEQUENCER_MT_editor_menus,
1366     SEQUENCER_MT_view,
1367     SEQUENCER_MT_view_toggle,
1368     SEQUENCER_MT_select,
1369     SEQUENCER_MT_marker,
1370     SEQUENCER_MT_frame,
1371     SEQUENCER_MT_add,
1372     SEQUENCER_MT_add_effect,
1373     SEQUENCER_MT_add_transitions,
1374     SEQUENCER_MT_add_empty,
1375     SEQUENCER_MT_strip,
1376     SEQUENCER_MT_strip_transform,
1377     SEQUENCER_MT_strip_input,
1378     SEQUENCER_MT_strip_lock_mute,
1379     SEQUENCER_PT_edit,
1380     SEQUENCER_PT_effect,
1381     SEQUENCER_PT_input,
1382     SEQUENCER_PT_sound,
1383     SEQUENCER_PT_scene,
1384     SEQUENCER_PT_mask,
1385     SEQUENCER_PT_filter,
1386     SEQUENCER_PT_proxy,
1387     SEQUENCER_PT_preview,
1388     SEQUENCER_PT_view,
1389     SEQUENCER_PT_view_safe_areas,
1390     SEQUENCER_PT_modifiers,
1391     SEQUENCER_PT_grease_pencil,
1392     SEQUENCER_PT_annotation_onion,
1393     SEQUENCER_PT_grease_pencil_tools,
1394     SEQUENCER_PT_custom_props,
1395 )
1396
1397 if __name__ == "__main__":  # only for live edit.
1398     from bpy.utils import register_class
1399     for cls in classes:
1400         register_class(cls)