Files
blender/release/scripts/startup/bl_ui/space_sequencer.py

1392 lines
47 KiB
Python
Raw Normal View History

# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
2010-02-12 13:34:04 +00:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
from rna_prop_ui import PropertyPanel
2017-10-21 12:41:42 +11:00
from .properties_grease_pencil_common import (
AnnotationDataPanel,
GreasePencilToolsPanel,
)
from bpy.app.translations import pgettext_iface as iface_
2010-05-16 12:15:04 +00:00
def act_strip(context):
try:
return context.scene.sequence_editor.active_strip
except AttributeError:
return None
def sel_sequences(context):
try:
2018-11-09 12:39:17 +01:00
return len(context.selected_sequences) if context.selected_sequences else 0
except AttributeError:
return 0
def draw_color_balance(layout, color_balance):
box = layout.box()
split = box.split(factor=0.35)
col = split.column(align=True)
col.label(text="Lift:")
col.separator()
col.separator()
col.prop(color_balance, "lift", text="")
col.prop(color_balance, "invert_lift", text="Invert", icon='ARROW_LEFTRIGHT')
split.template_color_picker(color_balance, "lift", value_slider=True, cubic=True)
box = layout.box()
split = box.split(factor=0.35)
col = split.column(align=True)
col.label(text="Gamma:")
col.separator()
col.separator()
col.prop(color_balance, "gamma", text="")
col.prop(color_balance, "invert_gamma", text="Invert", icon='ARROW_LEFTRIGHT')
split.template_color_picker(color_balance, "gamma", value_slider=True, lock_luminosity=True, cubic=True)
box = layout.box()
split = box.split(factor=0.35)
col = split.column(align=True)
col.label(text="Gain:")
col.separator()
col.separator()
col.prop(color_balance, "gain", text="")
col.prop(color_balance, "invert_gain", text="Invert", icon='ARROW_LEFTRIGHT')
split.template_color_picker(color_balance, "gain", value_slider=True, lock_luminosity=True, cubic=True)
class SEQUENCER_HT_header(Header):
bl_space_type = 'SEQUENCE_EDITOR'
def draw(self, context):
layout = self.layout
st = context.space_data
scene = context.scene
row = layout.row(align=True)
row.template_header()
layout.prop(st, "view_type", text="")
SEQUENCER_MT_editor_menus.draw_collapsible(context, layout)
2018-07-02 14:48:40 +02:00
if st.view_type == 'SEQUENCER':
layout.prop(st, "show_backdrop", text="Backdrop")
2018-06-28 08:27:03 +02:00
layout.separator_spacer()
layout.template_running_jobs()
if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
2018-07-02 14:48:40 +02:00
layout.separator()
layout.operator("sequencer.refresh_all", icon="FILE_REFRESH", text="")
2018-07-02 14:48:40 +02:00
if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
layout.prop(st, "display_mode", text="", icon_only=True)
2018-07-02 14:48:40 +02:00
if st.view_type != 'SEQUENCER':
layout.prop(st, "preview_channels", text="", icon_only=True)
layout.prop(st, "display_channel", text="Channel")
ed = scene.sequence_editor
if ed:
row = layout.row(align=True)
row.prop(ed, "show_overlay", text="", icon='GHOST_ENABLED')
if ed.show_overlay:
row.prop(ed, "overlay_frame", text="")
row.prop(ed, "use_overlay_lock", text="", icon='LOCKED')
row = layout.row()
row.prop(st, "overlay_type", text="")
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch) This merge-commit brings in a number of new features and workflow/UI improvements for working with Grease Pencil. While these were originally targetted at improving the workflow for creating 3D storyboards in Blender using the Grease Pencil, many of these changes should also prove useful in other workflows too. The main highlights here are: 1) It is now possible to edit Grease Pencil strokes - Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions to enter "Stroke Edit Mode". In this mode, many common editing tools will operate on Grease Pencil stroke points instead. - Tools implemented include Select, Select All/Border/Circle/Linked/More/Less, Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete. - Proportional Editing works when using the transform tools 2) Grease Pencil stroke settings can now be animated NOTE: Currently drivers don't work, but if time allows, this may still be added before the release. 3) Strokes can be drawn with "filled" interiors, using a separate set of colour/opacity settings to the ones used for the lines themselves. This makes use of OpenGL filled polys, which has the limitation of only being able to fill convex shapes. Some artifacts may be visible on concave shapes (e.g. pacman's mouth will be overdrawn) 4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing has been added which draws strokes as a series of screen-aligned discs. While this was originally a partial experimental technique at getting better quality 3D lines, the effects possible using this technique were interesting enough to warrant making this a dedicated feature. Best results when partial opacity and large stroke widths are used. 5) Improved Onion Skinning Support - Different colours can be selected for the before/after ghosts. To do so, enable the "colour wheel" toggle beside the Onion Skinning toggle, and set the colours accordingly. - Different numbers of ghosts can be shown before/after the current frame 6) Grease Pencil datablocks are now attached to the scene by default instead of the active object. - For a long time, the object-attachment has proved to be quite problematic for users to keep track of. Now that this is done at scene level, it is easier for most users to use. - An exception for old files (and for any addons which may benefit from object attachment instead), is that if the active object has a Grease Pencil datablock, that will be used instead. - It is not currently possible to choose object-attachment from the UI, but it is simple to do this from the console instead, by doing: context.active_object.grease_pencil = bpy.data.grease_pencil["blah"] 7) Various UI Cleanups - The layers UI has been cleaned up to use a list instead of the nested-panels design. Apart from saving space, this is also much nicer to look at now. - The UI code is now all defined in Python. To support this, it has been necessary to add some new context properties to make it easier to access these settings. e.g. "gpencil_data" for the datablock "active_gpencil_layer" and "active_gpencil_frame" for active data, "editable_gpencil_strokes" for the strokes that can be edited - The "stroke placement/alignment" settings (previously "Drawing Settings" at the bottom of the Grease Pencil panel in the Properties Region) is now located in the toolbar. These were more toolsettings than properties for how GPencil got drawn. - "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a suggestion for an earlier discussion on developer.blender.org - By default, the painting operator will wait for a mouse button to be pressed before it starts creating the stroke. This is to make it easier to include this operator in various toolbars/menus/etc. To get it immediately starting (as when you hold down DKEy to draw), set "wait_for_input" to False. - GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor - Toolbar panels have been added to all the other editors which support these. 8) Pie menus for quick-access to tools A set of experimental pie menus has been included for quick access to many tools and settings. It is not necessary to use these to get things done, but they have been designed to help make certain common tasks easier. - Ctrl-D = The main pie menu. Reveals tools in a context sensitive and spatially stable manner. - D Q = "Quick Settings" pie. This allows quick access to the active layer's settings. Notably, colours, thickness, and turning onion skinning on/off.
2014-12-01 01:52:06 +13:00
if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
gpd = context.gpencil_data
toolsettings = context.tool_settings
# Proportional editing
if gpd and gpd.use_stroke_edit_mode:
row = layout.row(align=True)
row.prop(toolsettings, "proportional_edit", icon_only=True)
if toolsettings.proportional_edit != 'DISABLED':
row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
2018-06-28 08:27:03 +02:00
class SEQUENCER_MT_editor_menus(Menu):
bl_idname = "SEQUENCER_MT_editor_menus"
bl_label = ""
def draw(self, context):
self.draw_menus(self.layout, context)
@staticmethod
def draw_menus(layout, context):
st = context.space_data
layout.menu("SEQUENCER_MT_view")
if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
layout.menu("SEQUENCER_MT_select")
layout.menu("SEQUENCER_MT_marker")
layout.menu("SEQUENCER_MT_add")
layout.menu("SEQUENCER_MT_frame")
layout.menu("SEQUENCER_MT_strip")
class SEQUENCER_MT_view_toggle(Menu):
bl_label = "View Type"
def draw(self, context):
layout = self.layout
2009-12-16 13:27:30 +00:00
layout.operator("sequencer.view_toggle").type = 'SEQUENCER'
layout.operator("sequencer.view_toggle").type = 'PREVIEW'
layout.operator("sequencer.view_toggle").type = 'SEQUENCER_PREVIEW'
class SEQUENCER_MT_view(Menu):
bl_label = "View"
def draw(self, context):
layout = self.layout
st = context.space_data
is_preview = st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}
is_sequencer_view = st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}
if st.view_type == 'PREVIEW':
# Specifying the REGION_PREVIEW context is needed in preview-only
# mode, else the lookup for the shortcut will fail in
# wm_keymap_item_find_props() (see #32595).
layout.operator_context = 'INVOKE_REGION_PREVIEW'
layout.operator("sequencer.properties", icon='MENU_PANEL')
layout.operator_context = 'INVOKE_DEFAULT'
2010-09-07 15:17:42 +00:00
layout.separator()
if is_sequencer_view:
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("sequencer.view_all", text="View all Sequences")
layout.operator("sequencer.view_selected")
layout.operator("sequencer.view_frame")
layout.operator_context = 'INVOKE_DEFAULT'
if is_preview:
layout.operator_context = 'INVOKE_REGION_PREVIEW'
layout.operator("sequencer.view_all_preview", text="Fit Preview in window")
2014-07-22 12:03:15 +10:00
layout.separator()
2014-07-22 12:03:15 +10:00
ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
for a, b in ratios:
layout.operator(
"sequencer.view_zoom_ratio",
text=iface_("Zoom %d:%d") % (a, b),
translate=False,
).ratio = a / b
2014-07-22 12:03:15 +10:00
layout.separator()
layout.operator_context = 'INVOKE_DEFAULT'
# # XXX, invokes in the header view
2012-07-04 21:41:05 +00:00
# layout.operator("sequencer.view_ghost_border", text="Overlay Border")
if is_sequencer_view:
layout.prop(st, "show_seconds")
layout.prop(st, "show_frame_indicator")
layout.prop(st, "show_strip_offset")
layout.prop_menu_enum(st, "waveform_display_type")
if is_preview:
if st.display_mode == 'IMAGE':
layout.prop(st, "show_safe_areas")
layout.prop(st, "show_metadata")
elif st.display_mode == 'WAVEFORM':
layout.prop(st, "show_separate_color")
layout.separator()
layout.operator("render.opengl", text="Sequence Render", icon='RENDER_STILL').sequencer = True
props = layout.operator("render.opengl", text="Sequence Render Animation", icon='RENDER_ANIMATION')
props.animation = True
props.sequencer = True
layout.separator()
layout.menu("INFO_MT_area")
class SEQUENCER_MT_select(Menu):
bl_label = "Select"
def draw(self, context):
layout = self.layout
layout.operator("sequencer.select_all", text="All").action = 'SELECT'
layout.operator("sequencer.select_all", text="None").action = 'DESELECT'
layout.operator("sequencer.select_all", text="Invert").action = 'INVERT'
layout.separator()
layout.operator("sequencer.select_active_side", text="Strips to the Left").side = 'LEFT'
layout.operator("sequencer.select_active_side", text="Strips to the Right").side = 'RIGHT'
props = layout.operator("sequencer.select", text="All Strips to the Left")
props.left_right = 'LEFT'
props.linked_time = True
props = layout.operator("sequencer.select", text="All Strips to the Right")
props.left_right = 'RIGHT'
props.linked_time = True
2014-09-17 18:36:17 +10:00
layout.separator()
layout.operator("sequencer.select_handles", text="Surrounding Handles").side = 'BOTH'
layout.operator("sequencer.select_handles", text="Left Handle").side = 'LEFT'
layout.operator("sequencer.select_handles", text="Right Handle").side = 'RIGHT'
layout.separator()
layout.operator_menu_enum("sequencer.select_grouped", "type", text="Grouped")
layout.operator("sequencer.select_linked")
layout.operator("sequencer.select_less")
layout.operator("sequencer.select_more")
class SEQUENCER_MT_marker(Menu):
bl_label = "Marker"
def draw(self, context):
layout = self.layout
st = context.space_data
is_sequencer_view = st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}
2017-10-21 12:41:42 +11:00
from .space_time import marker_menu_generic
marker_menu_generic(layout)
if is_sequencer_view:
layout.prop(st, "use_marker_sync")
class SEQUENCER_MT_frame(Menu):
bl_label = "Frame"
def draw(self, context):
layout = self.layout
layout.operator("anim.previewrange_clear")
layout.operator("anim.previewrange_set")
2016-03-17 10:57:40 +11:00
layout.separator()
props = layout.operator("sequencer.strip_jump", text="Jump to Previous Strip")
props.next = False
props.center = False
props = layout.operator("sequencer.strip_jump", text="Jump to Next Strip")
props.next = True
props.center = False
layout.separator()
props = layout.operator("sequencer.strip_jump", text="Jump to Previous Strip (Center)")
props.next = False
props.center = True
props = layout.operator("sequencer.strip_jump", text="Jump to Next Strip (Center)")
props.next = True
props.center = True
2014-09-17 18:36:17 +10:00
class SEQUENCER_MT_add(Menu):
bl_label = "Add"
def draw(self, context):
2012-07-29 12:07:06 +00:00
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
if len(bpy.data.scenes) > 10:
layout.operator_context = 'INVOKE_DEFAULT'
layout.operator("sequencer.scene_strip_add", text="Scene...", icon='SCENE_DATA')
elif len(bpy.data.scenes) > 1:
layout.operator_menu_enum("sequencer.scene_strip_add", "scene", text="Scene", icon='SCENE_DATA')
else:
layout.menu("SEQUENCER_MT_add_empty", text="Scene", icon='SCENE_DATA')
if len(bpy.data.movieclips) > 10:
layout.operator_context = 'INVOKE_DEFAULT'
layout.operator("sequencer.movieclip_strip_add", text="Clip...", icon='CLIP')
elif len(bpy.data.movieclips) > 1:
layout.operator_menu_enum("sequencer.movieclip_strip_add", "clip", text="Clip", icon='CLIP')
else:
layout.menu("SEQUENCER_MT_add_empty", text="Clip", icon='CLIP')
2012-06-07 18:24:36 +00:00
if len(bpy.data.masks) > 10:
layout.operator_context = 'INVOKE_DEFAULT'
layout.operator("sequencer.mask_strip_add", text="Mask...", icon='MOD_MASK')
elif len(bpy.data.masks) > 1:
layout.operator_menu_enum("sequencer.mask_strip_add", "mask", text="Mask", icon='MOD_MASK')
2012-06-07 18:24:36 +00:00
else:
layout.menu("SEQUENCER_MT_add_empty", text="Mask", icon='MOD_MASK')
layout.separator()
layout.operator("sequencer.movie_strip_add", text="Movie", icon='FILE_MOVIE')
layout.operator("sequencer.sound_strip_add", text="Sound", icon='FILE_SOUND')
layout.operator("sequencer.image_strip_add", text="Image/Sequence", icon='FILE_IMAGE')
layout.separator()
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("sequencer.effect_strip_add", text="Color", icon='COLOR').type = 'COLOR'
layout.operator("sequencer.effect_strip_add", text="Text", icon='FONT_DATA').type = 'TEXT'
layout.separator()
2012-06-07 18:24:36 +00:00
layout.operator("sequencer.effect_strip_add", text="Adjustment Layer", icon='COLOR').type = 'ADJUSTMENT'
layout.operator_context = 'INVOKE_DEFAULT'
layout.menu("SEQUENCER_MT_add_effect")
col = layout.column()
col.menu("SEQUENCER_MT_add_transitions")
col.enabled = sel_sequences(context) >= 2
class SEQUENCER_MT_add_empty(Menu):
bl_label = "Empty"
def draw(self, context):
layout = self.layout
layout.label(text="No Items Available")
class SEQUENCER_MT_add_transitions(Menu):
bl_label = "Transitions"
def draw(self, context):
layout = self.layout
col = layout.column()
col.operator("sequencer.effect_strip_add", text="Cross").type = 'CROSS'
col.operator("sequencer.effect_strip_add", text="Gamma Cross").type = 'GAMMA_CROSS'
col.separator()
col.operator("sequencer.effect_strip_add", text="Wipe").type = 'WIPE'
col.enabled = sel_sequences(context) >= 2
class SEQUENCER_MT_add_effect(Menu):
2017-05-28 20:41:23 -04:00
bl_label = "Effect Strip"
def draw(self, context):
2012-07-29 12:07:06 +00:00
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
col = layout.column()
col.operator("sequencer.effect_strip_add", text="Add").type = 'ADD'
col.operator("sequencer.effect_strip_add", text="Subtract").type = 'SUBTRACT'
col.operator("sequencer.effect_strip_add", text="Multiply").type = 'MULTIPLY'
col.operator("sequencer.effect_strip_add", text="Over Drop").type = 'OVER_DROP'
col.operator("sequencer.effect_strip_add", text="Alpha Over").type = 'ALPHA_OVER'
col.operator("sequencer.effect_strip_add", text="Alpha Under").type = 'ALPHA_UNDER'
col.operator("sequencer.effect_strip_add", text="Color Mix").type = 'COLORMIX'
col.enabled = sel_sequences(context) >=2
layout.separator()
layout.operator("sequencer.effect_strip_add", text="Multicam Selector").type = 'MULTICAM'
layout.separator()
col = layout.column()
col.operator("sequencer.effect_strip_add", text="Transform").type = 'TRANSFORM'
col.operator("sequencer.effect_strip_add", text="Speed Control").type = 'SPEED'
col.separator()
col.operator("sequencer.effect_strip_add", text="Glow").type = 'GLOW'
col.operator("sequencer.effect_strip_add", text="Gaussian Blur").type = 'GAUSSIAN_BLUR'
col.enabled = sel_sequences(context) != 0
class SEQUENCER_MT_strip_transform(Menu):
bl_label = "Transform"
def draw(self, context):
layout = self.layout
layout.operator("transform.transform", text="Move").mode = 'TRANSLATION'
layout.operator("transform.transform", text="Move/Extend from Frame").mode = 'TIME_EXTEND'
layout.operator("sequencer.slip", text="Slip Strip Contents")
layout.separator()
layout.operator_menu_enum("sequencer.swap", "side")
layout.separator()
layout.operator("sequencer.gap_remove").all = False
layout.operator("sequencer.gap_insert")
class SEQUENCER_MT_strip_input(Menu):
bl_label = "Inputs"
def draw(self, context):
layout = self.layout
strip = act_strip(context)
layout.operator("sequencer.reload", text="Reload Strips")
layout.operator("sequencer.reload", text="Reload Strips and Adjust Length").adjust_length = True
prop = layout.operator("sequencer.change_path", text="Change Path/Files")
layout.operator("sequencer.swap_data", text="Swap Data")
if strip:
stype = strip.type
if stype == 'IMAGE':
prop.filter_image = True
elif stype == 'MOVIE':
prop.filter_movie = True
elif stype == 'SOUND':
prop.filter_sound = True
class SEQUENCER_MT_strip_lock_mute(Menu):
bl_label = "Lock/Mute"
def draw(self, context):
layout = self.layout
layout.operator("sequencer.lock", icon='LOCKED')
layout.operator("sequencer.unlock")
layout.separator()
layout.operator("sequencer.mute").unselected = False
layout.operator("sequencer.unmute").unselected = False
layout.operator("sequencer.mute", text="Mute Deselected Strips").unselected = True
class SEQUENCER_MT_strip(Menu):
bl_label = "Strip"
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
layout.separator()
layout.menu("SEQUENCER_MT_strip_transform")
layout.operator("sequencer.snap")
layout.operator("sequencer.offset_clear")
layout.separator()
layout.operator("sequencer.copy", text="Copy")
layout.operator("sequencer.paste", text="Paste")
layout.operator("sequencer.duplicate_move")
layout.operator("sequencer.delete", text="Delete...")
layout.separator()
layout.operator("sequencer.cut", text="Cut (Hard) at frame").type = 'HARD'
layout.operator("sequencer.cut", text="Cut (Soft) at frame").type = 'SOFT'
layout.separator()
layout.operator("sequencer.deinterlace_selected_movies")
layout.operator("sequencer.rebuild_proxy")
strip = act_strip(context)
if strip:
stype = strip.type
if stype in {
'CROSS', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP', 'WIPE', 'GLOW',
'TRANSFORM', 'COLOR', 'SPEED', 'MULTICAM', 'ADJUSTMENT',
'GAUSSIAN_BLUR', 'TEXT',
}:
layout.separator()
layout.operator_menu_enum("sequencer.change_effect_input", "swap")
layout.operator_menu_enum("sequencer.change_effect_type", "type")
layout.operator("sequencer.reassign_inputs")
layout.operator("sequencer.swap_inputs")
elif stype in {'IMAGE', 'MOVIE'}:
layout.separator()
layout.operator("sequencer.rendersize")
layout.operator("sequencer.images_separate")
elif stype == 'SOUND':
layout.separator()
layout.operator("sequencer.crossfade_sounds")
elif stype == 'META':
layout.separator()
layout.operator("sequencer.meta_separate")
layout.separator()
layout.operator("sequencer.meta_make")
layout.separator()
layout.menu("SEQUENCER_MT_strip_input")
layout.separator()
layout.menu("SEQUENCER_MT_strip_lock_mute")
class SequencerButtonsPanel:
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
2009-12-16 13:27:30 +00:00
@staticmethod
def has_sequencer(context):
2011-06-24 03:30:50 +00:00
return (context.space_data.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'})
@classmethod
def poll(cls, context):
return cls.has_sequencer(context) and (act_strip(context) is not None)
class SequencerButtonsPanel_Output:
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
@staticmethod
def has_preview(context):
st = context.space_data
return (st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}) or st.show_backdrop
@classmethod
def poll(cls, context):
return cls.has_preview(context)
class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
bl_label = "Edit Strip"
bl_category = "Strip"
def draw(self, context):
layout = self.layout
2012-06-19 22:17:19 +00:00
scene = context.scene
frame_current = scene.frame_current
strip = act_strip(context)
split = layout.split(factor=0.25)
split.label(text="Name:")
split.prop(strip, "name", text="")
split = layout.split(factor=0.25)
split.label(text="Type:")
split.prop(strip, "type", text="")
if strip.type != 'SOUND':
split = layout.split(factor=0.25)
split.label(text="Blend:")
split.prop(strip, "blend_type", text="")
row = layout.row(align=True)
sub = row.row(align=True)
sub.active = (not strip.mute)
sub.prop(strip, "blend_alpha", text="Opacity", slider=True)
row.prop(strip, "mute", toggle=True, icon_only=True)
else:
row = layout.row()
row.prop(strip, "mute", toggle=True, icon_only=True, icon='MUTE_IPO_OFF')
col = layout.column(align=True)
row = col.row(align=True)
row_sub = row.row(align=True)
row_sub.enabled = not strip.lock
row_sub.prop(strip, "channel")
row.prop(strip, "lock", toggle=True, icon_only=True)
sub = col.column(align=True)
sub.enabled = not strip.lock
sub.prop(strip, "frame_start")
sub.prop(strip, "frame_final_duration")
col = layout.column(align=True)
row = col.row(align=True)
row.label(text=iface_("Final Length: %s") % bpy.utils.smpte_from_frame(strip.frame_final_duration),
translate=False)
row = col.row(align=True)
2010-08-18 08:26:18 +00:00
row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_duration)
row.label(text=iface_("Playhead: %d") % (frame_current - strip.frame_start), translate=False)
col.label(text=iface_("Frame Offset %d:%d") % (strip.frame_offset_start, strip.frame_offset_end),
translate=False)
col.label(text=iface_("Frame Still %d:%d") % (strip.frame_still_start, strip.frame_still_end), translate=False)
elem = False
2011-01-01 07:20:34 +00:00
if strip.type == 'IMAGE':
elem = strip.strip_elem_from_frame(frame_current)
elif strip.type == 'MOVIE':
elem = strip.elements[0]
if elem and elem.orig_width > 0 and elem.orig_height > 0:
col.label(text=iface_("Original Dimension: %dx%d") % (elem.orig_width, elem.orig_height), translate=False)
else:
col.label(text="Original Dimension: None")
class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
bl_label = "Effect Strip"
bl_category = "Strip"
@classmethod
def poll(cls, context):
if not cls.has_sequencer(context):
return False
strip = act_strip(context)
if not strip:
return False
return strip.type in {
'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED',
'MULTICAM', 'GAUSSIAN_BLUR', 'TEXT', 'COLORMIX'
}
def draw(self, context):
layout = self.layout
strip = act_strip(context)
if strip.input_count > 0:
col = layout.column()
col.enabled = False
col.prop(strip, "input_1")
if strip.input_count > 1:
col.prop(strip, "input_2")
if strip.type == 'COLOR':
layout.prop(strip, "color")
elif strip.type == 'WIPE':
col = layout.column()
col.prop(strip, "transition_type")
col.label(text="Direction:")
col.row().prop(strip, "direction", expand=True)
col = layout.column()
col.prop(strip, "blur_width", slider=True)
if strip.transition_type in {'SINGLE', 'DOUBLE'}:
col.prop(strip, "angle")
elif strip.type == 'GLOW':
flow = layout.column_flow()
flow.prop(strip, "threshold", slider=True)
flow.prop(strip, "clamp", slider=True)
flow.prop(strip, "boost_factor")
flow.prop(strip, "blur_radius")
row = layout.row()
row.prop(strip, "quality", slider=True)
row.prop(strip, "use_only_boost")
elif strip.type == 'SPEED':
layout.prop(strip, "use_default_fade", text="Stretch to input strip length")
if not strip.use_default_fade:
layout.prop(strip, "use_as_speed")
if strip.use_as_speed:
layout.prop(strip, "speed_factor")
else:
layout.prop(strip, "speed_factor", text="Frame Number")
layout.prop(strip, "scale_to_length")
elif strip.type == 'TRANSFORM':
layout = self.layout
col = layout.column()
2012-06-19 22:17:19 +00:00
col.prop(strip, "interpolation")
col.prop(strip, "translation_unit")
col = layout.column(align=True)
col.label(text="Position:")
row = col.row(align=True)
row.prop(strip, "translate_start_x", text="X")
row.prop(strip, "translate_start_y", text="Y")
layout.separator()
2012-06-19 22:17:19 +00:00
col = layout.column(align=True)
col.prop(strip, "use_uniform_scale")
2012-08-17 18:36:20 +00:00
if strip.use_uniform_scale:
col = layout.column(align=True)
col.prop(strip, "scale_start_x", text="Scale")
else:
col = layout.column(align=True)
col.label(text="Scale:")
row = col.row(align=True)
row.prop(strip, "scale_start_x", text="X")
row.prop(strip, "scale_start_y", text="Y")
layout.separator()
col = layout.column(align=True)
col.label(text="Rotation:")
col.prop(strip, "rotation_start", text="Rotation")
2011-11-11 03:28:46 +00:00
elif strip.type == 'MULTICAM':
col = layout.column(align=True)
strip_channel = strip.channel
col.prop(strip, "multicam_source", text="Source Channel")
# The multicam strip needs at least 2 strips to be useful
if strip_channel > 2:
BT_ROW = 4
col.label(text="Cut To:")
row = col.row()
for i in range(1, strip_channel):
if (i % BT_ROW) == 1:
row = col.row(align=True)
# Workaround - .enabled has to have a separate UI block to work
if i == strip.multicam_source:
sub = row.row(align=True)
sub.enabled = False
2018-06-28 08:30:54 +02:00
sub.operator("sequencer.cut_multicam", text=f"{i:d}").camera = i
else:
sub_1 = row.row(align=True)
sub_1.enabled = True
2018-06-28 08:30:54 +02:00
sub_1.operator("sequencer.cut_multicam", text=f"{i:d}").camera = i
if strip.channel > BT_ROW and (strip_channel - 1) % BT_ROW:
for i in range(strip.channel, strip_channel + ((BT_ROW + 1 - strip_channel) % BT_ROW)):
row.label(text="")
else:
col.separator()
col.label(text="Two or more channels are needed below this strip", icon='INFO')
elif strip.type == 'TEXT':
col = layout.column()
col.prop(strip, "text")
col.prop(strip, "font_size")
row = col.row()
row.prop(strip, "color")
row = col.row()
row.prop(strip, "use_shadow")
rowsub = row.row()
rowsub.active = strip.use_shadow
rowsub.prop(strip, "shadow_color", text="")
col.prop(strip, "align_x")
col.prop(strip, "align_y")
col.label(text="Location")
row = col.row(align=True)
row.prop(strip, "location", text="")
col.prop(strip, "wrap_width")
layout.operator("sequencer.export_subtitles", icon='EXPORT')
col = layout.column(align=True)
if strip.type == 'SPEED':
col.prop(strip, "multiply_speed")
2014-09-17 18:36:17 +10:00
elif strip.type in {'CROSS', 'GAMMA_CROSS', 'WIPE', 'ALPHA_OVER', 'ALPHA_UNDER', 'OVER_DROP'}:
col.prop(strip, "use_default_fade", text="Default fade")
if not strip.use_default_fade:
col.prop(strip, "effect_fader", text="Effect Fader")
elif strip.type == 'GAUSSIAN_BLUR':
row = col.row(align=True)
row.prop(strip, "size_x")
row.prop(strip, "size_y")
elif strip.type == 'COLORMIX':
split = layout.split(factor=0.35)
split.label(text="Blend Mode:")
split.prop(strip, "blend_effect", text="")
row = layout.row(align=True)
row.prop(strip, "factor", slider=True)
2016-02-01 00:47:10 +11:00
class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
bl_label = "Strip Input"
bl_category = "Strip"
@classmethod
def poll(cls, context):
if not cls.has_sequencer(context):
return False
strip = act_strip(context)
if not strip:
return False
return strip.type in {
'MOVIE', 'IMAGE', 'SCENE', 'MOVIECLIP', 'META',
'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
'MULTICAM', 'SPEED', 'ADJUSTMENT', 'COLORMIX'
}
2010-03-06 01:40:29 +00:00
def draw(self, context):
layout = self.layout
Multi-View and Stereo 3D Official Documentation: http://www.blender.org/manual/render/workflows/multiview.html Implemented Features ==================== Builtin Stereo Camera * Convergence Mode * Interocular Distance * Convergence Distance * Pivot Mode Viewport * Cameras * Plane * Volume Compositor * View Switch Node * Image Node Multi-View OpenEXR support Sequencer * Image/Movie Strips 'Use Multiview' UV/Image Editor * Option to see Multi-View images in Stereo-3D or its individual images * Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images I/O * Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images Scene Render Views * Ability to have an arbitrary number of views in the scene Missing Bits ============ First rule of Multi-View bug report: If something is not working as it should *when Views is off* this is a severe bug, do mention this in the report. Second rule is, if something works *when Views is off* but doesn't (or crashes) when *Views is on*, this is a important bug. Do mention this in the report. Everything else is likely small todos, and may wait until we are sure none of the above is happening. Apart from that there are those known issues: * Compositor Image Node poorly working for Multi-View OpenEXR (this was working prefectly before the 'Use Multi-View' functionality) * Selecting camera from Multi-View when looking from camera is problematic * Animation Playback (ctrl+F11) doesn't support stereo formats * Wrong filepath when trying to play back animated scene * Viewport Rendering doesn't support Multi-View * Overscan Rendering * Fullscreen display modes need to warn the user * Object copy should be aware of views suffix Acknowledgments =============== * Francesco Siddi for the help with the original feature specs and design * Brecht Van Lommel for the original review of the code and design early on * Blender Foundation for the Development Fund to support the project wrap up Final patch reviewers: * Antony Riakiotakis (psy-fi) * Campbell Barton (ideasman42) * Julian Eisel (Severin) * Sergey Sharybin (nazgul) * Thomas Dinged (dingto) Code contributors of the original branch in github: * Alexey Akishin * Gabriel Caraballo
2015-04-06 10:40:12 -03:00
scene = context.scene
strip = act_strip(context)
seq_type = strip.type
# draw a filename if we have one
if seq_type == 'IMAGE':
split = layout.split(factor=0.2)
split.label(text="Path:")
split.prop(strip, "directory", text="")
# Current element for the filename
Multi-View and Stereo 3D Official Documentation: http://www.blender.org/manual/render/workflows/multiview.html Implemented Features ==================== Builtin Stereo Camera * Convergence Mode * Interocular Distance * Convergence Distance * Pivot Mode Viewport * Cameras * Plane * Volume Compositor * View Switch Node * Image Node Multi-View OpenEXR support Sequencer * Image/Movie Strips 'Use Multiview' UV/Image Editor * Option to see Multi-View images in Stereo-3D or its individual images * Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images I/O * Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images Scene Render Views * Ability to have an arbitrary number of views in the scene Missing Bits ============ First rule of Multi-View bug report: If something is not working as it should *when Views is off* this is a severe bug, do mention this in the report. Second rule is, if something works *when Views is off* but doesn't (or crashes) when *Views is on*, this is a important bug. Do mention this in the report. Everything else is likely small todos, and may wait until we are sure none of the above is happening. Apart from that there are those known issues: * Compositor Image Node poorly working for Multi-View OpenEXR (this was working prefectly before the 'Use Multi-View' functionality) * Selecting camera from Multi-View when looking from camera is problematic * Animation Playback (ctrl+F11) doesn't support stereo formats * Wrong filepath when trying to play back animated scene * Viewport Rendering doesn't support Multi-View * Overscan Rendering * Fullscreen display modes need to warn the user * Object copy should be aware of views suffix Acknowledgments =============== * Francesco Siddi for the help with the original feature specs and design * Brecht Van Lommel for the original review of the code and design early on * Blender Foundation for the Development Fund to support the project wrap up Final patch reviewers: * Antony Riakiotakis (psy-fi) * Campbell Barton (ideasman42) * Julian Eisel (Severin) * Sergey Sharybin (nazgul) * Thomas Dinged (dingto) Code contributors of the original branch in github: * Alexey Akishin * Gabriel Caraballo
2015-04-06 10:40:12 -03:00
elem = strip.strip_elem_from_frame(scene.frame_current)
if elem:
split = layout.split(factor=0.2)
split.label(text="File:")
split.prop(elem, "filename", text="") # strip.elements[0] could be a fallback
split = layout.split(factor=0.4)
split.label(text="Color Space:")
split.prop(strip.colorspace_settings, "name", text="")
split = layout.split(factor=0.4)
split.label(text="Alpha:")
split.prop(strip, "alpha_mode", text="")
layout.operator("sequencer.change_path", icon='FILEBROWSER').filter_image = True
elif seq_type == 'MOVIE':
split = layout.split(factor=0.2)
split.label(text="Path:")
split.prop(strip, "filepath", text="")
2012-06-19 22:17:19 +00:00
split = layout.split(factor=0.4)
split.label(text="Color Space:")
split.prop(strip.colorspace_settings, "name", text="")
layout.prop(strip, "mpeg_preseek")
layout.prop(strip, "stream_index")
2012-06-19 22:17:19 +00:00
layout.prop(strip, "use_translation", text="Image Offset")
if strip.use_translation:
row = layout.row(align=True)
row.prop(strip.transform, "offset_x", text="X")
row.prop(strip.transform, "offset_y", text="Y")
layout.prop(strip, "use_crop", text="Image Crop")
if strip.use_crop:
col = layout.column(align=True)
2010-08-21 04:51:00 +00:00
col.prop(strip.crop, "max_y")
row = col.row(align=True)
row.prop(strip.crop, "min_x")
row.prop(strip.crop, "max_x")
2010-08-21 04:51:00 +00:00
col.prop(strip.crop, "min_y")
if not isinstance(strip, bpy.types.EffectSequence):
layout.label(text="Trim Duration (hard):")
row = layout.row(align=True)
row.prop(strip, "animation_offset_start", text="Start")
row.prop(strip, "animation_offset_end", text="End")
layout.label(text="Trim Duration (soft):")
row = layout.row(align=True)
row.prop(strip, "frame_offset_start", text="Start")
row.prop(strip, "frame_offset_end", text="End")
2010-03-06 01:40:29 +00:00
Multi-View and Stereo 3D Official Documentation: http://www.blender.org/manual/render/workflows/multiview.html Implemented Features ==================== Builtin Stereo Camera * Convergence Mode * Interocular Distance * Convergence Distance * Pivot Mode Viewport * Cameras * Plane * Volume Compositor * View Switch Node * Image Node Multi-View OpenEXR support Sequencer * Image/Movie Strips 'Use Multiview' UV/Image Editor * Option to see Multi-View images in Stereo-3D or its individual images * Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images I/O * Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images Scene Render Views * Ability to have an arbitrary number of views in the scene Missing Bits ============ First rule of Multi-View bug report: If something is not working as it should *when Views is off* this is a severe bug, do mention this in the report. Second rule is, if something works *when Views is off* but doesn't (or crashes) when *Views is on*, this is a important bug. Do mention this in the report. Everything else is likely small todos, and may wait until we are sure none of the above is happening. Apart from that there are those known issues: * Compositor Image Node poorly working for Multi-View OpenEXR (this was working prefectly before the 'Use Multi-View' functionality) * Selecting camera from Multi-View when looking from camera is problematic * Animation Playback (ctrl+F11) doesn't support stereo formats * Wrong filepath when trying to play back animated scene * Viewport Rendering doesn't support Multi-View * Overscan Rendering * Fullscreen display modes need to warn the user * Object copy should be aware of views suffix Acknowledgments =============== * Francesco Siddi for the help with the original feature specs and design * Brecht Van Lommel for the original review of the code and design early on * Blender Foundation for the Development Fund to support the project wrap up Final patch reviewers: * Antony Riakiotakis (psy-fi) * Campbell Barton (ideasman42) * Julian Eisel (Severin) * Sergey Sharybin (nazgul) * Thomas Dinged (dingto) Code contributors of the original branch in github: * Alexey Akishin * Gabriel Caraballo
2015-04-06 10:40:12 -03:00
if scene.render.use_multiview and seq_type in {'IMAGE', 'MOVIE'}:
layout.prop(strip, "use_multiview")
col = layout.column()
col.active = strip.use_multiview
col.label(text="Views Format:")
col.row().prop(strip, "views_format", expand=True)
box = col.box()
box.active = strip.views_format == 'STEREO_3D'
box.template_image_stereo_3d(strip.stereo_3d_format)
2010-03-06 01:40:29 +00:00
class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
bl_label = "Sound"
bl_category = "Strip"
@classmethod
def poll(cls, context):
if not cls.has_sequencer(context):
return False
strip = act_strip(context)
if not strip:
return False
return (strip.type == 'SOUND')
def draw(self, context):
layout = self.layout
st = context.space_data
strip = act_strip(context)
sound = strip.sound
layout.template_ID(strip, "sound", open="sound.open")
if sound is not None:
layout.prop(sound, "filepath", text="")
row = layout.row()
if sound.packed_file:
row.operator("sound.unpack", icon='PACKAGE', text="Unpack")
else:
row.operator("sound.pack", icon='UGLYPACKAGE', text="Pack")
row.prop(sound, "use_memory_cache")
layout.prop(sound, "use_mono")
if st.waveform_display_type == 'DEFAULT_WAVEFORMS':
layout.prop(strip, "show_waveform")
col = layout.column(align=True)
col.prop(strip, "volume")
col.prop(strip, "pitch")
col.prop(strip, "pan")
col = layout.column(align=True)
col.label(text="Trim Duration (hard):")
row = layout.row(align=True)
row.prop(strip, "animation_offset_start", text="Start")
row.prop(strip, "animation_offset_end", text="End")
col = layout.column(align=True)
col.label(text="Trim Duration (soft):")
row = layout.row(align=True)
row.prop(strip, "frame_offset_start", text="Start")
row.prop(strip, "frame_offset_end", text="End")
class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
bl_label = "Scene"
bl_category = "Strip"
@classmethod
def poll(cls, context):
if not cls.has_sequencer(context):
return False
strip = act_strip(context)
if not strip:
return False
return (strip.type == 'SCENE')
def draw(self, context):
layout = self.layout
strip = act_strip(context)
layout.template_ID(strip, "scene")
2011-06-24 03:30:50 +00:00
scene = strip.scene
layout.prop(strip, "use_sequence")
2011-06-24 03:30:50 +00:00
if not strip.use_sequence:
layout.label(text="Camera Override")
layout.template_ID(strip, "scene_camera")
layout.prop(strip, "use_grease_pencil", text="Show Grease Pencil")
2011-06-24 03:30:50 +00:00
if scene:
layout.prop(scene, "audio_volume", text="Audio Volume")
if not strip.use_sequence:
if scene:
# Warning, this is not a good convention to follow.
# Expose here because setting the alpha from the 'Render' menu is very inconvenient.
layout.label(text="Preview")
layout.prop(scene.render, "alpha_mode")
if scene:
2011-06-24 03:30:50 +00:00
sta = scene.frame_start
end = scene.frame_end
layout.label(text=iface_("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1), translate=False)
2012-06-07 18:24:36 +00:00
class SEQUENCER_PT_mask(SequencerButtonsPanel, Panel):
bl_label = "Mask"
bl_category = "Strip"
2012-06-07 18:24:36 +00:00
@classmethod
def poll(cls, context):
if not cls.has_sequencer(context):
return False
strip = act_strip(context)
if not strip:
return False
return (strip.type == 'MASK')
def draw(self, context):
layout = self.layout
strip = act_strip(context)
layout.template_ID(strip, "mask")
mask = strip.mask
if mask:
sta = mask.frame_start
end = mask.frame_end
layout.label(text=iface_("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1), translate=False)
2012-06-07 18:24:36 +00:00
class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
bl_label = "Filter"
bl_category = "Strip"
@classmethod
def poll(cls, context):
if not cls.has_sequencer(context):
return False
strip = act_strip(context)
if not strip:
return False
return strip.type in {
'MOVIE', 'IMAGE', 'SCENE', 'MOVIECLIP', 'MASK',
'META', 'ADD', 'SUBTRACT', 'ALPHA_OVER',
'ALPHA_UNDER', 'CROSS', 'GAMMA_CROSS', 'MULTIPLY',
'OVER_DROP', 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
'MULTICAM', 'SPEED', 'ADJUSTMENT', 'COLORMIX'
}
def draw(self, context):
layout = self.layout
strip = act_strip(context)
col = layout.column()
col.label(text="Video:")
col.prop(strip, "strobe")
if strip.type == 'MOVIECLIP':
col = layout.column()
col.label(text="Tracker:")
col.prop(strip, "stabilize2d")
col = layout.column()
col.label(text="Distortion:")
col.prop(strip, "undistort")
2012-06-19 22:17:19 +00:00
split = layout.split(factor=0.6)
col = split.column()
col.prop(strip, "use_reverse_frames", text="Reverse")
col.prop(strip, "use_deinterlace")
2012-06-19 22:17:19 +00:00
col = split.column()
col.prop(strip, "use_flip_x", text="X Flip")
col.prop(strip, "use_flip_y", text="Y Flip")
layout.label(text="Color:")
col = layout.column(align=True)
col.prop(strip, "color_saturation", text="Saturation")
col.prop(strip, "color_multiply", text="Multiply")
layout.prop(strip, "use_float", text="Convert to Float")
class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
bl_label = "Proxy/Timecode"
bl_category = "Strip"
@classmethod
def poll(cls, context):
if not cls.has_sequencer(context):
return False
strip = act_strip(context)
if not strip:
return False
return strip.type in {'MOVIE', 'IMAGE', 'SCENE', 'META', 'MULTICAM'}
def draw_header(self, context):
strip = act_strip(context)
self.layout.prop(strip, "use_proxy", text="")
def draw(self, context):
layout = self.layout
ed = context.scene.sequence_editor
strip = act_strip(context)
if strip.proxy:
proxy = strip.proxy
flow = layout.column_flow()
flow.prop(ed, "proxy_storage", text="Storage")
if ed.proxy_storage == 'PROJECT':
flow.prop(ed, "proxy_dir", text="Directory")
else:
flow.prop(proxy, "use_proxy_custom_directory")
flow.prop(proxy, "use_proxy_custom_file")
if proxy.use_proxy_custom_directory and not proxy.use_proxy_custom_file:
flow.prop(proxy, "directory")
if proxy.use_proxy_custom_file:
flow.prop(proxy, "filepath")
row = layout.row(align=True)
row.prop(strip.proxy, "build_25", toggle=True)
row.prop(strip.proxy, "build_50", toggle=True)
row.prop(strip.proxy, "build_75", toggle=True)
row.prop(strip.proxy, "build_100", toggle=True)
layout.prop(proxy, "use_overwrite")
col = layout.column()
col.prop(proxy, "quality", text="Build JPEG Quality")
2012-07-04 21:41:05 +00:00
if strip.type == 'MOVIE':
col = layout.column()
col.label(text="Use timecode index:")
col.prop(proxy, "timecode")
col = layout.column()
col.operator("sequencer.enable_proxies")
col.operator("sequencer.rebuild_proxy")
class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
bl_label = "Scene Preview/Render"
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
bl_category = "Strip"
def draw(self, context):
layout = self.layout
2012-07-29 12:07:06 +00:00
render = context.scene.render
col = layout.column()
col.prop(render, "sequencer_gl_preview", text="")
row = col.row()
row.active = render.sequencer_gl_preview == 'SOLID'
row.prop(render, "use_sequencer_gl_textured_solid")
col.prop(render, "use_sequencer_gl_dof")
class SEQUENCER_PT_view(SequencerButtonsPanel_Output, Panel):
bl_label = "View Settings"
bl_category = "Strip"
def draw(self, context):
layout = self.layout
st = context.space_data
col = layout.column()
if st.display_mode == 'IMAGE':
col.prop(st, "show_overexposed")
col.separator()
elif st.display_mode == 'WAVEFORM':
col.prop(st, "show_separate_color")
col = layout.column()
col.separator()
col.prop(st, "proxy_render_size")
class SEQUENCER_PT_view_safe_areas(SequencerButtonsPanel_Output, Panel):
bl_label = "Safe Areas"
bl_category = "Strip"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
st = context.space_data
is_preview = st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}
return is_preview and (st.display_mode == 'IMAGE')
def draw_header(self, context):
st = context.space_data
self.layout.prop(st, "show_safe_areas", text="")
def draw(self, context):
2017-10-21 12:41:42 +11:00
from .properties_data_camera import draw_display_safe_settings
2015-01-27 17:46:07 +11:00
layout = self.layout
st = context.space_data
2015-01-27 17:46:07 +11:00
safe_data = context.scene.safe_areas
2015-01-27 17:46:07 +11:00
draw_display_safe_settings(layout, safe_data, st)
class SEQUENCER_PT_modifiers(SequencerButtonsPanel, Panel):
bl_label = "Modifiers"
bl_category = "Modifiers"
def draw(self, context):
layout = self.layout
strip = act_strip(context)
ed = context.scene.sequence_editor
Color Management, Stage 2: Switch color pipeline to use OpenColorIO Replace old color pipeline which was supporting linear/sRGB color spaces only with OpenColorIO-based pipeline. This introduces two configurable color spaces: - Input color space for images and movie clips. This space is used to convert images/movies from color space in which file is saved to Blender's linear space (for float images, byte images are not internally converted, only input space is stored for such images and used later). This setting could be found in image/clip data block settings. - Display color space which defines space in which particular display is working. This settings could be found in scene's Color Management panel. When render result is being displayed on the screen, apart from converting image to display space, some additional conversions could happen. This conversions are: - View, which defines tone curve applying before display transformation. These are different ways to view the image on the same display device. For example it could be used to emulate film view on sRGB display. - Exposure affects on image exposure before tone map is applied. - Gamma is post-display gamma correction, could be used to match particular display gamma. - RGB curves are user-defined curves which are applying before display transformation, could be used for different purposes. All this settings by default are only applying on render result and does not affect on other images. If some particular image needs to be affected by this transformation, "View as Render" setting of image data block should be set to truth. Movie clips are always affected by all display transformations. This commit also introduces configurable color space in which sequencer is working. This setting could be found in scene's Color Management panel and it should be used if such stuff as grading needs to be done in color space different from sRGB (i.e. when Film view on sRGB display is use, using VD16 space as sequencer's internal space would make grading working in space which is close to the space using for display). Some technical notes: - Image buffer's float buffer is now always in linear space, even if it was created from 16bit byte images. - Space of byte buffer is stored in image buffer's rect_colorspace property. - Profile of image buffer was removed since it's not longer meaningful. - OpenGL and GLSL is supposed to always work in sRGB space. It is possible to support other spaces, but it's quite large project which isn't so much important. - Legacy Color Management option disabled is emulated by using None display. It could have some regressions, but there's no clear way to avoid them. - If OpenColorIO is disabled on build time, it should make blender behaving in the same way as previous release with color management enabled. More details could be found at this page (more details would be added soon): http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management -- Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO integration and to Brecht van Lommel for some further development and code/ usecase review!
2012-09-15 10:05:07 +00:00
layout.prop(strip, "use_linear_modifiers")
layout.operator_menu_enum("sequencer.strip_modifier_add", "type")
layout.operator("sequencer.strip_modifier_copy")
for mod in strip.modifiers:
box = layout.box()
row = box.row()
row.prop(mod, "show_expanded", text="", emboss=False)
row.prop(mod, "name", text="")
row.prop(mod, "mute", text="")
sub = row.row(align=True)
props = sub.operator("sequencer.strip_modifier_move", text="", icon='TRIA_UP')
props.name = mod.name
props.direction = 'UP'
props = sub.operator("sequencer.strip_modifier_move", text="", icon='TRIA_DOWN')
props.name = mod.name
props.direction = 'DOWN'
row.operator("sequencer.strip_modifier_remove", text="", icon='X', emboss=False).name = mod.name
if mod.show_expanded:
row = box.row()
row.prop(mod, "input_mask_type", expand=True)
if mod.input_mask_type == 'STRIP':
sequences_object = ed
if ed.meta_stack:
sequences_object = ed.meta_stack[-1]
box.prop_search(mod, "input_mask_strip", sequences_object, "sequences", text="Mask")
else:
box.prop(mod, "input_mask_id")
row = box.row()
row.prop(mod, "mask_time", expand=True)
if mod.type == 'COLOR_BALANCE':
box.prop(mod, "color_multiply")
draw_color_balance(box, mod.color_balance)
elif mod.type == 'CURVES':
box.template_curve_mapping(mod, "curve_mapping", type='COLOR', show_tone=True)
elif mod.type == 'HUE_CORRECT':
box.template_curve_mapping(mod, "curve_mapping", type='HUE')
elif mod.type == 'BRIGHT_CONTRAST':
col = box.column()
col.prop(mod, "bright")
col.prop(mod, "contrast")
elif mod.type == 'WHITE_BALANCE':
col = box.column()
col.prop(mod, "white_value")
elif mod.type == 'TONEMAP':
col = box.column()
col.prop(mod, "tonemap_type")
if mod.tonemap_type == 'RD_PHOTORECEPTOR':
col.prop(mod, "intensity")
col.prop(mod, "contrast")
col.prop(mod, "adaptation")
col.prop(mod, "correction")
elif mod.tonemap_type == 'RH_SIMPLE':
col.prop(mod, "key")
col.prop(mod, "offset")
col.prop(mod, "gamma")
2016-02-01 00:47:10 +11:00
class SEQUENCER_PT_grease_pencil(AnnotationDataPanel, SequencerButtonsPanel_Output, Panel):
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch) This merge-commit brings in a number of new features and workflow/UI improvements for working with Grease Pencil. While these were originally targetted at improving the workflow for creating 3D storyboards in Blender using the Grease Pencil, many of these changes should also prove useful in other workflows too. The main highlights here are: 1) It is now possible to edit Grease Pencil strokes - Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions to enter "Stroke Edit Mode". In this mode, many common editing tools will operate on Grease Pencil stroke points instead. - Tools implemented include Select, Select All/Border/Circle/Linked/More/Less, Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete. - Proportional Editing works when using the transform tools 2) Grease Pencil stroke settings can now be animated NOTE: Currently drivers don't work, but if time allows, this may still be added before the release. 3) Strokes can be drawn with "filled" interiors, using a separate set of colour/opacity settings to the ones used for the lines themselves. This makes use of OpenGL filled polys, which has the limitation of only being able to fill convex shapes. Some artifacts may be visible on concave shapes (e.g. pacman's mouth will be overdrawn) 4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing has been added which draws strokes as a series of screen-aligned discs. While this was originally a partial experimental technique at getting better quality 3D lines, the effects possible using this technique were interesting enough to warrant making this a dedicated feature. Best results when partial opacity and large stroke widths are used. 5) Improved Onion Skinning Support - Different colours can be selected for the before/after ghosts. To do so, enable the "colour wheel" toggle beside the Onion Skinning toggle, and set the colours accordingly. - Different numbers of ghosts can be shown before/after the current frame 6) Grease Pencil datablocks are now attached to the scene by default instead of the active object. - For a long time, the object-attachment has proved to be quite problematic for users to keep track of. Now that this is done at scene level, it is easier for most users to use. - An exception for old files (and for any addons which may benefit from object attachment instead), is that if the active object has a Grease Pencil datablock, that will be used instead. - It is not currently possible to choose object-attachment from the UI, but it is simple to do this from the console instead, by doing: context.active_object.grease_pencil = bpy.data.grease_pencil["blah"] 7) Various UI Cleanups - The layers UI has been cleaned up to use a list instead of the nested-panels design. Apart from saving space, this is also much nicer to look at now. - The UI code is now all defined in Python. To support this, it has been necessary to add some new context properties to make it easier to access these settings. e.g. "gpencil_data" for the datablock "active_gpencil_layer" and "active_gpencil_frame" for active data, "editable_gpencil_strokes" for the strokes that can be edited - The "stroke placement/alignment" settings (previously "Drawing Settings" at the bottom of the Grease Pencil panel in the Properties Region) is now located in the toolbar. These were more toolsettings than properties for how GPencil got drawn. - "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a suggestion for an earlier discussion on developer.blender.org - By default, the painting operator will wait for a mouse button to be pressed before it starts creating the stroke. This is to make it easier to include this operator in various toolbars/menus/etc. To get it immediately starting (as when you hold down DKEy to draw), set "wait_for_input" to False. - GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor - Toolbar panels have been added to all the other editors which support these. 8) Pie menus for quick-access to tools A set of experimental pie menus has been included for quick access to many tools and settings. It is not necessary to use these to get things done, but they have been designed to help make certain common tasks easier. - Ctrl-D = The main pie menu. Reveals tools in a context sensitive and spatially stable manner. - D Q = "Quick Settings" pie. This allows quick access to the active layer's settings. Notably, colours, thickness, and turning onion skinning on/off.
2014-12-01 01:52:06 +13:00
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
bl_category = "Strip"
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch) This merge-commit brings in a number of new features and workflow/UI improvements for working with Grease Pencil. While these were originally targetted at improving the workflow for creating 3D storyboards in Blender using the Grease Pencil, many of these changes should also prove useful in other workflows too. The main highlights here are: 1) It is now possible to edit Grease Pencil strokes - Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions to enter "Stroke Edit Mode". In this mode, many common editing tools will operate on Grease Pencil stroke points instead. - Tools implemented include Select, Select All/Border/Circle/Linked/More/Less, Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete. - Proportional Editing works when using the transform tools 2) Grease Pencil stroke settings can now be animated NOTE: Currently drivers don't work, but if time allows, this may still be added before the release. 3) Strokes can be drawn with "filled" interiors, using a separate set of colour/opacity settings to the ones used for the lines themselves. This makes use of OpenGL filled polys, which has the limitation of only being able to fill convex shapes. Some artifacts may be visible on concave shapes (e.g. pacman's mouth will be overdrawn) 4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing has been added which draws strokes as a series of screen-aligned discs. While this was originally a partial experimental technique at getting better quality 3D lines, the effects possible using this technique were interesting enough to warrant making this a dedicated feature. Best results when partial opacity and large stroke widths are used. 5) Improved Onion Skinning Support - Different colours can be selected for the before/after ghosts. To do so, enable the "colour wheel" toggle beside the Onion Skinning toggle, and set the colours accordingly. - Different numbers of ghosts can be shown before/after the current frame 6) Grease Pencil datablocks are now attached to the scene by default instead of the active object. - For a long time, the object-attachment has proved to be quite problematic for users to keep track of. Now that this is done at scene level, it is easier for most users to use. - An exception for old files (and for any addons which may benefit from object attachment instead), is that if the active object has a Grease Pencil datablock, that will be used instead. - It is not currently possible to choose object-attachment from the UI, but it is simple to do this from the console instead, by doing: context.active_object.grease_pencil = bpy.data.grease_pencil["blah"] 7) Various UI Cleanups - The layers UI has been cleaned up to use a list instead of the nested-panels design. Apart from saving space, this is also much nicer to look at now. - The UI code is now all defined in Python. To support this, it has been necessary to add some new context properties to make it easier to access these settings. e.g. "gpencil_data" for the datablock "active_gpencil_layer" and "active_gpencil_frame" for active data, "editable_gpencil_strokes" for the strokes that can be edited - The "stroke placement/alignment" settings (previously "Drawing Settings" at the bottom of the Grease Pencil panel in the Properties Region) is now located in the toolbar. These were more toolsettings than properties for how GPencil got drawn. - "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a suggestion for an earlier discussion on developer.blender.org - By default, the painting operator will wait for a mouse button to be pressed before it starts creating the stroke. This is to make it easier to include this operator in various toolbars/menus/etc. To get it immediately starting (as when you hold down DKEy to draw), set "wait_for_input" to False. - GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor - Toolbar panels have been added to all the other editors which support these. 8) Pie menus for quick-access to tools A set of experimental pie menus has been included for quick access to many tools and settings. It is not necessary to use these to get things done, but they have been designed to help make certain common tasks easier. - Ctrl-D = The main pie menu. Reveals tools in a context sensitive and spatially stable manner. - D Q = "Quick Settings" pie. This allows quick access to the active layer's settings. Notably, colours, thickness, and turning onion skinning on/off.
2014-12-01 01:52:06 +13:00
# 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_grease_pencil_tools(GreasePencilToolsPanel, SequencerButtonsPanel_Output, Panel):
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
bl_category = "Strip"
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch) This merge-commit brings in a number of new features and workflow/UI improvements for working with Grease Pencil. While these were originally targetted at improving the workflow for creating 3D storyboards in Blender using the Grease Pencil, many of these changes should also prove useful in other workflows too. The main highlights here are: 1) It is now possible to edit Grease Pencil strokes - Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions to enter "Stroke Edit Mode". In this mode, many common editing tools will operate on Grease Pencil stroke points instead. - Tools implemented include Select, Select All/Border/Circle/Linked/More/Less, Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete. - Proportional Editing works when using the transform tools 2) Grease Pencil stroke settings can now be animated NOTE: Currently drivers don't work, but if time allows, this may still be added before the release. 3) Strokes can be drawn with "filled" interiors, using a separate set of colour/opacity settings to the ones used for the lines themselves. This makes use of OpenGL filled polys, which has the limitation of only being able to fill convex shapes. Some artifacts may be visible on concave shapes (e.g. pacman's mouth will be overdrawn) 4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing has been added which draws strokes as a series of screen-aligned discs. While this was originally a partial experimental technique at getting better quality 3D lines, the effects possible using this technique were interesting enough to warrant making this a dedicated feature. Best results when partial opacity and large stroke widths are used. 5) Improved Onion Skinning Support - Different colours can be selected for the before/after ghosts. To do so, enable the "colour wheel" toggle beside the Onion Skinning toggle, and set the colours accordingly. - Different numbers of ghosts can be shown before/after the current frame 6) Grease Pencil datablocks are now attached to the scene by default instead of the active object. - For a long time, the object-attachment has proved to be quite problematic for users to keep track of. Now that this is done at scene level, it is easier for most users to use. - An exception for old files (and for any addons which may benefit from object attachment instead), is that if the active object has a Grease Pencil datablock, that will be used instead. - It is not currently possible to choose object-attachment from the UI, but it is simple to do this from the console instead, by doing: context.active_object.grease_pencil = bpy.data.grease_pencil["blah"] 7) Various UI Cleanups - The layers UI has been cleaned up to use a list instead of the nested-panels design. Apart from saving space, this is also much nicer to look at now. - The UI code is now all defined in Python. To support this, it has been necessary to add some new context properties to make it easier to access these settings. e.g. "gpencil_data" for the datablock "active_gpencil_layer" and "active_gpencil_frame" for active data, "editable_gpencil_strokes" for the strokes that can be edited - The "stroke placement/alignment" settings (previously "Drawing Settings" at the bottom of the Grease Pencil panel in the Properties Region) is now located in the toolbar. These were more toolsettings than properties for how GPencil got drawn. - "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a suggestion for an earlier discussion on developer.blender.org - By default, the painting operator will wait for a mouse button to be pressed before it starts creating the stroke. This is to make it easier to include this operator in various toolbars/menus/etc. To get it immediately starting (as when you hold down DKEy to draw), set "wait_for_input" to False. - GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor - Toolbar panels have been added to all the other editors which support these. 8) Pie menus for quick-access to tools A set of experimental pie menus has been included for quick access to many tools and settings. It is not necessary to use these to get things done, but they have been designed to help make certain common tasks easier. - Ctrl-D = The main pie menu. Reveals tools in a context sensitive and spatially stable manner. - D Q = "Quick Settings" pie. This allows quick access to the active layer's settings. Notably, colours, thickness, and turning onion skinning on/off.
2014-12-01 01:52:06 +13:00
# NOTE: this is just a wrapper around the generic GP tools panel
# It contains access to some essential tools usually found only in
# toolbar, which doesn't exist here...
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch) This merge-commit brings in a number of new features and workflow/UI improvements for working with Grease Pencil. While these were originally targetted at improving the workflow for creating 3D storyboards in Blender using the Grease Pencil, many of these changes should also prove useful in other workflows too. The main highlights here are: 1) It is now possible to edit Grease Pencil strokes - Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions to enter "Stroke Edit Mode". In this mode, many common editing tools will operate on Grease Pencil stroke points instead. - Tools implemented include Select, Select All/Border/Circle/Linked/More/Less, Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete. - Proportional Editing works when using the transform tools 2) Grease Pencil stroke settings can now be animated NOTE: Currently drivers don't work, but if time allows, this may still be added before the release. 3) Strokes can be drawn with "filled" interiors, using a separate set of colour/opacity settings to the ones used for the lines themselves. This makes use of OpenGL filled polys, which has the limitation of only being able to fill convex shapes. Some artifacts may be visible on concave shapes (e.g. pacman's mouth will be overdrawn) 4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing has been added which draws strokes as a series of screen-aligned discs. While this was originally a partial experimental technique at getting better quality 3D lines, the effects possible using this technique were interesting enough to warrant making this a dedicated feature. Best results when partial opacity and large stroke widths are used. 5) Improved Onion Skinning Support - Different colours can be selected for the before/after ghosts. To do so, enable the "colour wheel" toggle beside the Onion Skinning toggle, and set the colours accordingly. - Different numbers of ghosts can be shown before/after the current frame 6) Grease Pencil datablocks are now attached to the scene by default instead of the active object. - For a long time, the object-attachment has proved to be quite problematic for users to keep track of. Now that this is done at scene level, it is easier for most users to use. - An exception for old files (and for any addons which may benefit from object attachment instead), is that if the active object has a Grease Pencil datablock, that will be used instead. - It is not currently possible to choose object-attachment from the UI, but it is simple to do this from the console instead, by doing: context.active_object.grease_pencil = bpy.data.grease_pencil["blah"] 7) Various UI Cleanups - The layers UI has been cleaned up to use a list instead of the nested-panels design. Apart from saving space, this is also much nicer to look at now. - The UI code is now all defined in Python. To support this, it has been necessary to add some new context properties to make it easier to access these settings. e.g. "gpencil_data" for the datablock "active_gpencil_layer" and "active_gpencil_frame" for active data, "editable_gpencil_strokes" for the strokes that can be edited - The "stroke placement/alignment" settings (previously "Drawing Settings" at the bottom of the Grease Pencil panel in the Properties Region) is now located in the toolbar. These were more toolsettings than properties for how GPencil got drawn. - "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a suggestion for an earlier discussion on developer.blender.org - By default, the painting operator will wait for a mouse button to be pressed before it starts creating the stroke. This is to make it easier to include this operator in various toolbars/menus/etc. To get it immediately starting (as when you hold down DKEy to draw), set "wait_for_input" to False. - GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor - Toolbar panels have been added to all the other editors which support these. 8) Pie menus for quick-access to tools A set of experimental pie menus has been included for quick access to many tools and settings. It is not necessary to use these to get things done, but they have been designed to help make certain common tasks easier. - Ctrl-D = The main pie menu. Reveals tools in a context sensitive and spatially stable manner. - D Q = "Quick Settings" pie. This allows quick access to the active layer's settings. Notably, colours, thickness, and turning onion skinning on/off.
2014-12-01 01:52:06 +13:00
class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
_context_path = "scene.sequence_editor.active_strip"
_property_type = (bpy.types.Sequence,)
bl_category = "Strip"
classes = (
SEQUENCER_HT_header,
SEQUENCER_MT_editor_menus,
SEQUENCER_MT_view,
SEQUENCER_MT_view_toggle,
SEQUENCER_MT_select,
SEQUENCER_MT_marker,
SEQUENCER_MT_frame,
SEQUENCER_MT_add,
SEQUENCER_MT_add_effect,
SEQUENCER_MT_add_transitions,
SEQUENCER_MT_add_empty,
SEQUENCER_MT_strip,
SEQUENCER_MT_strip_transform,
SEQUENCER_MT_strip_input,
SEQUENCER_MT_strip_lock_mute,
SEQUENCER_PT_edit,
SEQUENCER_PT_effect,
SEQUENCER_PT_input,
SEQUENCER_PT_sound,
SEQUENCER_PT_scene,
SEQUENCER_PT_mask,
SEQUENCER_PT_filter,
SEQUENCER_PT_proxy,
SEQUENCER_PT_preview,
SEQUENCER_PT_view,
SEQUENCER_PT_view_safe_areas,
SEQUENCER_PT_modifiers,
SEQUENCER_PT_grease_pencil,
SEQUENCER_PT_grease_pencil_tools,
SEQUENCER_PT_custom_props,
)
if __name__ == "__main__": # only for live edit.
from bpy.utils import register_class
for cls in classes:
register_class(cls)