1 # ##### BEGIN GPL LICENSE BLOCK #####
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.
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.
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.
17 # ##### END GPL LICENSE BLOCK #####
21 from bpy.types import Header, Menu, Panel
24 def act_strip(context):
26 return context.scene.sequence_editor.active_strip
27 except AttributeError:
31 class SEQUENCER_HT_header(Header):
32 bl_space_type = 'SEQUENCE_EDITOR'
34 def draw(self, context):
37 st = context.space_data
39 row = layout.row(align=True)
42 if context.area.show_menus:
43 row.menu("SEQUENCER_MT_view")
45 if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
46 row.menu("SEQUENCER_MT_select")
47 row.menu("SEQUENCER_MT_marker")
48 row.menu("SEQUENCER_MT_add")
49 row.menu("SEQUENCER_MT_strip")
51 layout.prop(st, "view_type", expand=True, text="")
53 if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
54 layout.prop(st, "display_mode", expand=True, text="")
56 if st.view_type == 'SEQUENCER':
57 row = layout.row(align=True)
58 row.operator("sequencer.copy", text="", icon='COPYDOWN')
59 row.operator("sequencer.paste", text="", icon='PASTEDOWN')
62 layout.operator("sequencer.refresh_all")
63 elif st.view_type == 'SEQUENCER_PREVIEW':
65 layout.operator("sequencer.refresh_all")
66 layout.prop(st, "display_channel", text="Channel")
68 layout.prop(st, "display_channel", text="Channel")
70 ed = context.scene.sequence_editor
72 row = layout.row(align=True)
73 row.prop(ed, "show_overlay", text="", icon='GHOST_ENABLED')
75 row.prop(ed, "overlay_frame", text="")
76 row.prop(ed, "overlay_lock", text="", icon='LOCKED')
78 row = layout.row(align=True)
79 props = row.operator("render.opengl", text="", icon='RENDER_STILL')
80 props.sequencer = True
81 props = row.operator("render.opengl", text="", icon='RENDER_ANIMATION')
82 props.animation = True
83 props.sequencer = True
85 layout.template_running_jobs()
88 class SEQUENCER_MT_view_toggle(Menu):
89 bl_label = "View Type"
91 def draw(self, context):
94 layout.operator("sequencer.view_toggle").type = 'SEQUENCER'
95 layout.operator("sequencer.view_toggle").type = 'PREVIEW'
96 layout.operator("sequencer.view_toggle").type = 'SEQUENCER_PREVIEW'
99 class SEQUENCER_MT_view(Menu):
102 def draw(self, context):
105 st = context.space_data
107 layout.operator("sequencer.properties", icon='MENU_PANEL')
111 if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
112 layout.operator("sequencer.view_all", text="View all Sequences")
113 if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
114 layout.operator_context = 'INVOKE_REGION_PREVIEW'
115 layout.operator("sequencer.view_all_preview", text="Fit preview in window")
116 layout.operator("sequencer.view_zoom_ratio", text="Show preview 1:1").ratio = 1.0
117 layout.operator_context = 'INVOKE_DEFAULT'
119 # # XXX, invokes in the header view
120 # layout.operator("sequencer.view_ghost_border", text="Overlay Border")
122 layout.operator("sequencer.view_selected")
124 layout.prop(st, "show_seconds")
126 layout.prop(st, "show_frame_indicator")
127 if st.display_mode == 'IMAGE':
128 layout.prop(st, "show_safe_margin")
129 if st.display_mode == 'WAVEFORM':
130 layout.prop(st, "show_separate_color")
133 layout.prop(st, "use_marker_sync")
136 layout.operator("screen.area_dupli")
137 layout.operator("screen.screen_full_area")
140 class SEQUENCER_MT_select(Menu):
143 def draw(self, context):
146 layout.operator("sequencer.select_active_side", text="Strips to the Left").side = 'LEFT'
147 layout.operator("sequencer.select_active_side", text="Strips to the Right").side = 'RIGHT'
149 layout.operator("sequencer.select_handles", text="Surrounding Handles").side = 'BOTH'
150 layout.operator("sequencer.select_handles", text="Left Handle").side = 'LEFT'
151 layout.operator("sequencer.select_handles", text="Right Handle").side = 'RIGHT'
153 layout.operator_menu_enum("sequencer.select_grouped", "type", text="Grouped")
154 layout.operator("sequencer.select_linked")
155 layout.operator("sequencer.select_all").action = 'TOGGLE'
156 layout.operator("sequencer.select_all", text="Inverse").action = 'INVERT'
159 class SEQUENCER_MT_marker(Menu):
162 def draw(self, context):
165 from bl_ui.space_time import marker_menu_generic
166 marker_menu_generic(layout)
169 class SEQUENCER_MT_change(Menu):
172 def draw(self, context):
175 layout.operator_context = 'INVOKE_REGION_WIN'
177 layout.operator_menu_enum("sequencer.change_effect_input", "swap")
178 layout.operator_menu_enum("sequencer.change_effect_type", "type")
179 layout.operator("sequencer.change_path", text="Path/Files")
182 class SEQUENCER_MT_add(Menu):
185 def draw(self, context):
188 layout.operator_context = 'INVOKE_REGION_WIN'
190 if len(bpy.data.scenes) > 10:
191 layout.operator_context = 'INVOKE_DEFAULT'
192 layout.operator("sequencer.scene_strip_add", text="Scene...")
194 layout.operator_menu_enum("sequencer.scene_strip_add", "scene", text="Scene...")
196 if len(bpy.data.movieclips) > 10:
197 layout.operator_context = 'INVOKE_DEFAULT'
198 layout.operator("sequencer.movieclip_strip_add", text="Clips...")
200 layout.operator_menu_enum("sequencer.movieclip_strip_add", "clip", text="Clip...")
202 if len(bpy.data.masks) > 10:
203 layout.operator_context = 'INVOKE_DEFAULT'
204 layout.operator("sequencer.mask_strip_add", text="Masks...")
206 layout.operator_menu_enum("sequencer.mask_strip_add", "mask", text="Mask...")
208 layout.operator("sequencer.movie_strip_add", text="Movie")
209 layout.operator("sequencer.image_strip_add", text="Image")
210 layout.operator("sequencer.sound_strip_add", text="Sound")
212 layout.menu("SEQUENCER_MT_add_effect")
215 class SEQUENCER_MT_add_effect(Menu):
216 bl_label = "Effect Strip..."
218 def draw(self, context):
221 layout.operator_context = 'INVOKE_REGION_WIN'
223 layout.operator("sequencer.effect_strip_add", text="Add").type = 'ADD'
224 layout.operator("sequencer.effect_strip_add", text="Subtract").type = 'SUBTRACT'
225 layout.operator("sequencer.effect_strip_add", text="Alpha Over").type = 'ALPHA_OVER'
226 layout.operator("sequencer.effect_strip_add", text="Alpha Under").type = 'ALPHA_UNDER'
227 layout.operator("sequencer.effect_strip_add", text="Cross").type = 'CROSS'
228 layout.operator("sequencer.effect_strip_add", text="Gamma Cross").type = 'GAMMA_CROSS'
229 layout.operator("sequencer.effect_strip_add", text="Multiply").type = 'MULTIPLY'
230 layout.operator("sequencer.effect_strip_add", text="Over Drop").type = 'OVER_DROP'
231 layout.operator("sequencer.effect_strip_add", text="Wipe").type = 'WIPE'
232 layout.operator("sequencer.effect_strip_add", text="Glow").type = 'GLOW'
233 layout.operator("sequencer.effect_strip_add", text="Transform").type = 'TRANSFORM'
234 layout.operator("sequencer.effect_strip_add", text="Color").type = 'COLOR'
235 layout.operator("sequencer.effect_strip_add", text="Speed Control").type = 'SPEED'
236 layout.operator("sequencer.effect_strip_add", text="Multicam Selector").type = 'MULTICAM'
237 layout.operator("sequencer.effect_strip_add", text="Adjustment Layer").type = 'ADJUSTMENT'
240 class SEQUENCER_MT_strip(Menu):
243 def draw(self, context):
246 layout.operator_context = 'INVOKE_REGION_WIN'
248 layout.operator("transform.transform", text="Grab/Move").mode = 'TRANSLATION'
249 layout.operator("transform.transform", text="Grab/Extend from frame").mode = 'TIME_EXTEND'
250 # uiItemO(layout, NULL, 0, "sequencer.strip_snap"); // TODO - add this operator
253 layout.operator("sequencer.cut", text="Cut (hard) at frame").type = 'HARD'
254 layout.operator("sequencer.cut", text="Cut (soft) at frame").type = 'SOFT'
255 layout.operator("sequencer.images_separate")
256 layout.operator("sequencer.offset_clear")
257 layout.operator("sequencer.deinterlace_selected_movies")
258 layout.operator("sequencer.rebuild_proxy")
261 layout.operator("sequencer.duplicate_move")
262 layout.operator("sequencer.delete")
264 strip = act_strip(context)
269 # XXX note strip.type is never equal to 'EFFECT', look at seq_type_items within rna_sequencer.c
270 if stype == 'EFFECT':
273 # layout.operator("sequencer.effect_change")
274 # layout.operator("sequencer.effect_reassign_inputs")
275 elif stype == 'IMAGE':
277 # layout.operator("sequencer.image_change")
278 layout.operator("sequencer.rendersize")
279 elif stype == 'SCENE':
282 # layout.operator("sequencer.scene_change", text="Change Scene")
283 elif stype == 'MOVIE':
285 # layout.operator("sequencer.movie_change")
286 layout.operator("sequencer.rendersize")
287 elif stype == 'SOUND':
289 layout.operator("sequencer.crossfade_sounds")
293 layout.operator("sequencer.meta_make")
294 layout.operator("sequencer.meta_separate")
296 #if (ed && (ed->metastack.first || (ed->act_seq && ed->act_seq->type == SEQ_META))) {
298 # uiItemO(layout, NULL, 0, "sequencer.meta_toggle");
302 props = layout.operator("sequencer.reload", text="Reload Strips")
303 props.adjust_length = False
304 props = layout.operator("sequencer.reload", text="Reload Strips and Adjust Length")
305 props.adjust_length = True
306 layout.operator("sequencer.reassign_inputs")
307 layout.operator("sequencer.swap_inputs")
309 layout.operator("sequencer.lock")
310 layout.operator("sequencer.unlock")
311 layout.operator("sequencer.mute").unselected = False
312 layout.operator("sequencer.unmute")
314 layout.operator("sequencer.mute", text="Mute Deselected Strips").unselected = True
316 layout.operator("sequencer.snap")
318 layout.operator_menu_enum("sequencer.swap", "side")
322 layout.operator("sequencer.swap_data")
323 layout.menu("SEQUENCER_MT_change")
326 class SequencerButtonsPanel():
327 bl_space_type = 'SEQUENCE_EDITOR'
328 bl_region_type = 'UI'
331 def has_sequencer(context):
332 return (context.space_data.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'})
335 def poll(cls, context):
336 return cls.has_sequencer(context) and (act_strip(context) is not None)
339 class SequencerButtonsPanel_Output():
340 bl_space_type = 'SEQUENCE_EDITOR'
341 bl_region_type = 'UI'
344 def has_preview(context):
345 return (context.space_data.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'})
348 def poll(cls, context):
349 return cls.has_preview(context)
352 class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
353 bl_label = "Edit Strip"
355 def draw(self, context):
358 scene = context.scene
359 frame_current = scene.frame_current
360 strip = act_strip(context)
362 split = layout.split(percentage=0.3)
363 split.label(text="Name:")
364 split.prop(strip, "name", text="")
366 split = layout.split(percentage=0.3)
367 split.label(text="Type:")
368 split.prop(strip, "type", text="")
370 split = layout.split(percentage=0.3)
371 split.label(text="Blend:")
372 split.prop(strip, "blend_type", text="")
374 row = layout.row(align=True)
376 sub.active = (not strip.mute)
377 sub.prop(strip, "blend_alpha", text="Opacity", slider=True)
378 row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON' if strip.mute else 'RESTRICT_VIEW_OFF', text="")
379 row.prop(strip, "lock", toggle=True, icon='LOCKED' if strip.lock else 'UNLOCKED', text="")
381 col = layout.column()
383 sub.enabled = not strip.lock
384 sub.prop(strip, "channel")
385 sub.prop(strip, "frame_start")
386 sub.prop(strip, "frame_final_duration")
388 col = layout.column(align=True)
390 row.label(text="Final Length" + ": %s" % bpy.utils.smpte_from_frame(strip.frame_final_duration))
392 row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_duration)
393 row.label(text="Playhead" + ": %d" % (frame_current - strip.frame_start))
395 col.label(text="Frame Offset" + " %d:%d" % (strip.frame_offset_start, strip.frame_offset_end))
396 col.label(text="Frame Still" + " %d:%d" % (strip.frame_still_start, strip.frame_still_end))
400 if strip.type == 'IMAGE':
401 elem = strip.getStripElem(frame_current)
402 elif strip.type == 'MOVIE':
403 elem = strip.elements[0]
405 if elem and elem.orig_width > 0 and elem.orig_height > 0:
406 col.label(text="Original Dimension" + ": %dx%d" % (elem.orig_width, elem.orig_height))
408 col.label(text="Original Dimension: None")
411 class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
412 bl_label = "Effect Strip"
415 def poll(cls, context):
416 if not cls.has_sequencer(context):
419 strip = act_strip(context)
423 return strip.type in {'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
424 'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
425 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED',
426 'MULTICAM', 'ADJUSTMENT'}
428 def draw(self, context):
431 sequencer = context.scene.sequence_editor
432 strip = act_strip(context)
434 if strip.input_count > 0:
435 col = layout.column()
436 col.prop(strip, "input_1")
437 if strip.input_count > 1:
438 col.prop(strip, "input_2")
440 if strip.is_supports_mask:
441 col = layout.column()
442 col.prop_search(strip, "input_mask", sequencer, "sequences")
444 if strip.type == 'COLOR':
445 layout.prop(strip, "color")
447 elif strip.type == 'WIPE':
448 col = layout.column()
449 col.prop(strip, "transition_type")
450 col.label(text="Direction:")
451 col.row().prop(strip, "direction", expand=True)
453 col = layout.column()
454 col.prop(strip, "blur_width", slider=True)
455 if strip.transition_type in {'SINGLE', 'DOUBLE'}:
456 col.prop(strip, "angle")
458 elif strip.type == 'GLOW':
459 flow = layout.column_flow()
460 flow.prop(strip, "threshold", slider=True)
461 flow.prop(strip, "clamp", slider=True)
462 flow.prop(strip, "boost_factor")
463 flow.prop(strip, "blur_radius")
466 row.prop(strip, "quality", slider=True)
467 row.prop(strip, "use_only_boost")
469 elif strip.type == 'SPEED':
470 layout.prop(strip, "use_default_fade", "Stretch to input strip length")
471 if not strip.use_default_fade:
472 layout.prop(strip, "use_as_speed")
473 if strip.use_as_speed:
474 layout.prop(strip, "speed_factor")
476 layout.prop(strip, "speed_factor", text="Frame number")
477 layout.prop(strip, "scale_to_length")
479 #doesn't work currently
480 #layout.prop(strip, "use_frame_blend")
482 elif strip.type == 'TRANSFORM':
484 col = layout.column()
486 col.prop(strip, "interpolation")
487 col.prop(strip, "translation_unit")
488 col = layout.column(align=True)
489 col.label(text="Position:")
490 col.prop(strip, "translate_start_x", text="X")
491 col.prop(strip, "translate_start_y", text="Y")
495 col = layout.column(align=True)
496 col.prop(strip, "use_uniform_scale")
497 if (strip.use_uniform_scale):
498 col = layout.column(align=True)
499 col.prop(strip, "scale_start_x", text="Scale")
501 col = layout.column(align=True)
502 col.label(text="Scale:")
503 col.prop(strip, "scale_start_x", text="X")
504 col.prop(strip, "scale_start_y", text="Y")
508 col = layout.column(align=True)
509 col.label(text="Rotation:")
510 col.prop(strip, "rotation_start", text="Rotation")
512 elif strip.type == 'MULTICAM':
513 layout.prop(strip, "multicam_source")
515 row = layout.row(align=True)
519 sub.operator("screen.animation_play", text="", icon='PAUSE' if context.screen.is_animation_playing else 'PLAY')
522 for i in range(1, strip.channel):
523 row.operator("sequencer.cut_multicam", text=str(i)).camera = i
525 col = layout.column(align=True)
526 if strip.type == 'SPEED':
527 col.prop(strip, "multiply_speed")
528 elif strip.type in {'CROSS', 'GAMMA_CROSS', 'WIPE'}:
529 col.prop(strip, "use_default_fade", "Default fade")
530 if not strip.use_default_fade:
531 col.prop(strip, "effect_fader", text="Effect fader")
534 class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
535 bl_label = "Strip Input"
538 def poll(cls, context):
539 if not cls.has_sequencer(context):
542 strip = act_strip(context)
546 return strip.type in {'MOVIE', 'IMAGE', 'SCENE', 'MOVIECLIP', 'META',
547 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
548 'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
549 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
550 'MULTICAM', 'SPEED', 'ADJUSTMENT'}
552 def draw(self, context):
555 strip = act_strip(context)
557 seq_type = strip.type
559 # draw a filename if we have one
560 if seq_type == 'IMAGE':
561 split = layout.split(percentage=0.2)
562 split.label(text="Path:")
563 split.prop(strip, "directory", text="")
565 # Current element for the filename
567 elem = strip.getStripElem(context.scene.frame_current)
569 split = layout.split(percentage=0.2)
570 split.label(text="File:")
571 split.prop(elem, "filename", text="") # strip.elements[0] could be a fallback
573 layout.operator("sequencer.change_path")
575 elif seq_type == 'MOVIE':
576 split = layout.split(percentage=0.2)
577 split.label(text="Path:")
578 split.prop(strip, "filepath", text="")
580 layout.prop(strip, "mpeg_preseek")
581 layout.prop(strip, "stream_index")
583 layout.prop(strip, "use_translation", text="Image Offset")
584 if strip.use_translation:
585 col = layout.column(align=True)
586 col.prop(strip.transform, "offset_x", text="X")
587 col.prop(strip.transform, "offset_y", text="Y")
589 layout.prop(strip, "use_crop", text="Image Crop")
591 col = layout.column(align=True)
592 col.prop(strip.crop, "max_y")
593 col.prop(strip.crop, "min_x")
594 col.prop(strip.crop, "min_y")
595 col.prop(strip.crop, "max_x")
597 if not isinstance(strip, bpy.types.EffectSequence):
598 col = layout.column(align=True)
599 col.label(text="Trim Duration (hard):")
600 col.prop(strip, "animation_offset_start", text="Start")
601 col.prop(strip, "animation_offset_end", text="End")
603 col = layout.column(align=True)
604 col.label(text="Trim Duration (soft):")
605 col.prop(strip, "frame_offset_start", text="Start")
606 col.prop(strip, "frame_offset_end", text="End")
609 class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
613 def poll(cls, context):
614 if not cls.has_sequencer(context):
617 strip = act_strip(context)
621 return (strip.type == 'SOUND')
623 def draw(self, context):
626 strip = act_strip(context)
629 layout.template_ID(strip, "sound", open="sound.open")
632 layout.prop(strip, "filepath", text="")
635 if sound.packed_file:
636 row.operator("sound.unpack", icon='PACKAGE', text="Unpack")
638 row.operator("sound.pack", icon='UGLYPACKAGE', text="Pack")
640 row.prop(sound, "use_memory_cache")
642 layout.prop(strip, "show_waveform")
643 layout.prop(strip, "volume")
644 layout.prop(strip, "pitch")
645 layout.prop(strip, "pan")
647 col = layout.column(align=True)
648 col.label(text="Trim Duration:")
649 col.prop(strip, "animation_offset_start", text="Start")
650 col.prop(strip, "animation_offset_end", text="End")
653 class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
657 def poll(cls, context):
658 if not cls.has_sequencer(context):
661 strip = act_strip(context)
665 return (strip.type == 'SCENE')
667 def draw(self, context):
670 strip = act_strip(context)
672 layout.template_ID(strip, "scene")
676 layout.prop(scene.render, "use_sequencer")
678 layout.label(text="Camera Override")
679 layout.template_ID(strip, "scene_camera")
682 sta = scene.frame_start
683 end = scene.frame_end
684 layout.label(text="Original frame range" + ": %d-%d (%d)" % (sta, end, end - sta + 1))
687 class SEQUENCER_PT_mask(SequencerButtonsPanel, Panel):
691 def poll(cls, context):
692 if not cls.has_sequencer(context):
695 strip = act_strip(context)
699 return (strip.type == 'MASK')
701 def draw(self, context):
704 strip = act_strip(context)
706 layout.template_ID(strip, "mask")
711 sta = mask.frame_start
713 layout.label(text="Original frame range" + ": %d-%d (%d)" % (sta, end, end - sta + 1))
716 class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
720 def poll(cls, context):
721 if not cls.has_sequencer(context):
724 strip = act_strip(context)
728 return strip.type in {'MOVIE', 'IMAGE', 'SCENE', 'MOVIECLIP', 'MASK',
729 'META', 'ADD', 'SUBTRACT', 'ALPHA_OVER',
730 'ALPHA_UNDER', 'CROSS', 'GAMMA_CROSS', 'MULTIPLY',
731 'OVER_DROP', 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
732 'MULTICAM', 'SPEED', 'ADJUSTMENT'}
734 def draw(self, context):
737 strip = act_strip(context)
739 col = layout.column()
740 col.label(text="Video:")
741 col.prop(strip, "strobe")
743 if strip.type == 'MOVIECLIP':
744 col = layout.column()
745 col.label(text="Tracker:")
746 col.prop(strip, "stabilize2d")
748 col = layout.column()
749 col.label(text="Distortion:")
750 col.prop(strip, "undistort")
752 split = layout.split(percentage=0.65)
755 col.prop(strip, "use_reverse_frames", text="Backwards")
756 col.prop(strip, "use_deinterlace")
759 col.label(text="Flip:")
760 col.prop(strip, "use_flip_x", text="X")
761 col.prop(strip, "use_flip_y", text="Y")
763 col = layout.column()
764 col.label(text="Colors:")
765 col.prop(strip, "color_saturation", text="Saturation")
766 col.prop(strip, "color_multiply", text="Multiply")
767 col.prop(strip, "use_premultiply")
768 col.prop(strip, "use_float")
770 layout.prop(strip, "use_color_balance")
771 if strip.use_color_balance and strip.color_balance: # TODO - need to add this somehow
772 col = layout.column()
773 col.label(text="Lift:")
774 col.template_color_wheel(strip.color_balance, "lift", value_slider=True, cubic=True)
776 row.prop(strip.color_balance, "lift", text="")
777 row.prop(strip.color_balance, "invert_lift", text="Inverse")
779 col = layout.column()
780 col.label(text="Gamma:")
781 col.template_color_wheel(strip.color_balance, "gamma", value_slider=True, lock_luminosity=True, cubic=True)
783 row.prop(strip.color_balance, "gamma", text="")
784 row.prop(strip.color_balance, "invert_gamma", text="Inverse")
786 col = layout.column()
787 col.label(text="Gain:")
788 col.template_color_wheel(strip.color_balance, "gain", value_slider=True, lock_luminosity=True, cubic=True)
790 row.prop(strip.color_balance, "gain", text="")
791 row.prop(strip.color_balance, "invert_gain", text="Inverse")
794 class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
795 bl_label = "Proxy / Timecode"
798 def poll(cls, context):
799 if not cls.has_sequencer(context):
802 strip = act_strip(context)
806 return strip.type in {'MOVIE', 'IMAGE', 'SCENE', 'META', 'MULTICAM'}
808 def draw_header(self, context):
809 strip = act_strip(context)
811 self.layout.prop(strip, "use_proxy", text="")
813 def draw(self, context):
816 strip = act_strip(context)
818 flow = layout.column_flow()
819 flow.prop(strip, "use_proxy_custom_directory")
820 flow.prop(strip, "use_proxy_custom_file")
822 if strip.use_proxy_custom_directory and not strip.use_proxy_custom_file:
823 flow.prop(strip.proxy, "directory")
824 if strip.use_proxy_custom_file:
825 flow.prop(strip.proxy, "filepath")
828 row.prop(strip.proxy, "build_25")
829 row.prop(strip.proxy, "build_50")
830 row.prop(strip.proxy, "build_75")
831 row.prop(strip.proxy, "build_100")
833 col = layout.column()
834 col.label(text="Build JPEG quality")
835 col.prop(strip.proxy, "quality")
837 if strip.type == 'MOVIE':
838 col = layout.column()
839 col.label(text="Use timecode index:")
841 col.prop(strip.proxy, "timecode")
844 class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
845 bl_label = "Scene Preview/Render"
846 bl_space_type = 'SEQUENCE_EDITOR'
847 bl_region_type = 'UI'
849 def draw(self, context):
852 render = context.scene.render
854 col = layout.column()
855 col.active = False # Currently only opengl preview works!
856 col.prop(render, "use_sequencer_gl_preview", text="Open GL Preview")
857 col = layout.column()
858 #col.active = render.use_sequencer_gl_preview
859 col.prop(render, "sequencer_gl_preview", text="")
862 class SEQUENCER_PT_view(SequencerButtonsPanel_Output, Panel):
863 bl_label = "View Settings"
865 def draw(self, context):
868 st = context.space_data
870 col = layout.column()
871 if st.display_mode == 'IMAGE':
872 col.prop(st, "draw_overexposed")
873 col.prop(st, "show_safe_margin")
874 elif st.display_mode == 'WAVEFORM':
875 col.prop(st, "show_separate_color")
876 col.prop(st, "proxy_render_size")
878 if __name__ == "__main__": # only for live edit.
879 bpy.utils.register_module(__name__)