Sequencer WIP

- Move buttons into the sequencer Nkey region
- Made the header and menu items use the python api, still need to get more buttons working.
- Fixed some minor problems
This commit is contained in:
Campbell Barton 2009-06-08 16:48:12 +00:00
parent ddbd871567
commit 62160cef8a
13 changed files with 474 additions and 732 deletions

View File

@ -1,229 +0,0 @@
import bpy
def act_strip(context):
try: return context.scene.sequence_editor.active_strip
except: return None
class SequencerButtonsPanel(bpy.types.Panel):
__space_type__ = "BUTTONS_WINDOW"
__region_type__ = "WINDOW"
__context__ = "sequencer"
def poll(self, context):
return act_strip(context) != None
class SEQUENCER_PT_edit(SequencerButtonsPanel):
__label__ = "Edit Strip"
__idname__ = "SEQUENCER_PT_edit"
def draw(self, context):
layout = self.layout
strip = act_strip(context)
layout.itemR(strip, "name")
layout.itemR(strip, "blend_mode")
layout.itemR(strip, "blend_opacity")
row = layout.row()
row.itemR(strip, "mute")
row.itemR(strip, "lock")
row.itemR(strip, "frame_locked")
row = layout.row()
row.itemR(strip, "channel")
row.itemR(strip, "start_frame")
row = layout.row()
row.itemR(strip, "length")
row.itemR(strip, "type")
class SEQUENCER_PT_effect(SequencerButtonsPanel):
__label__ = "Effect Strip"
__idname__ = "SEQUENCER_PT_effect"
def poll(self, context):
strip = act_strip(context)
if not strip:
return False
return strip.type in ('COLOR', 'WIPE', 'GLOW', 'SPEED', 'TRANSFORM')
def draw(self, context):
layout = self.layout
strip = act_strip(context)
if strip.type == 'COLOR':
layout.itemR(strip, "color")
elif strip.type == 'WIPE':
row = layout.row()
row.itemL(text="Transition Type:")
row.itemL(text="Direction:")
row = layout.row()
row.itemR(strip, "transition_type", text="")
row.itemR(strip, "direction", text="")
row = layout.row()
row.itemR(strip, "blur_width")
if strip.transition_type in ('SINGLE', 'DOUBLE'):
row.itemR(strip, "angle")
elif strip.type == 'GLOW':
flow = layout.column_flow()
flow.itemR(strip, "threshold")
flow.itemR(strip, "clamp")
flow.itemR(strip, "boost_factor")
flow.itemR(strip, "blur_distance")
row = layout.row()
row.itemR(strip, "quality", slider=True)
row.itemR(strip, "only_boost")
elif strip.type == 'SPEED':
layout.itemR(strip, "global_speed")
flow = layout.column_flow()
flow.itemR(strip, "curve_velocity")
flow.itemR(strip, "curve_compress_y")
flow.itemR(strip, "frame_blending")
elif strip.type == 'TRANSFORM':
row = layout.row()
row.itemL(text="Interpolation:")
row.itemL(text="Translation Unit:")
row = layout.row()
row.itemR(strip, "interpolation", text="")
row.itemR(strip, "translation_unit", text="")
split = layout.split()
col = split.column()
sub = col.column(align=True)
sub.itemL(text="Position X:")
sub.itemR(strip, "translate_start_x", text="Start")
sub.itemR(strip, "translate_end_x", text="End")
sub = col.column(align=True)
sub.itemL(text="Scale X:")
sub.itemR(strip, "scale_start_x", text="Start")
sub.itemR(strip, "scale_end_x", text="End")
sub = col.column(align=True)
sub.itemL(text="Rotation:")
sub.itemR(strip, "rotation_start", text="Start")
sub.itemR(strip, "rotation_end", text="End")
col = split.column()
sub = col.column(align=True)
sub.itemL(text="Position Y:")
sub.itemR(strip, "translate_start_y", text="Start")
sub.itemR(strip, "translate_end_y", text="End")
sub = col.column(align=True)
sub.itemL(text="Scale Y:")
sub.itemR(strip, "scale_start_y", text="Start")
sub.itemR(strip, "scale_end_y", text="End")
class SEQUENCER_PT_input(SequencerButtonsPanel):
__label__ = "Strip Input"
__idname__ = "SEQUENCER_PT_input"
def poll(self, context):
strip = act_strip(context)
if not strip:
return False
return strip.type in ('MOVIE', 'IMAGE', 'SCENE', 'META')
def draw(self, context):
layout = self.layout
strip = act_strip(context)
layout.itemR(strip, "directory")
# TODO - get current element!
layout.itemR(strip.elements[0], "filename")
"""
layout.itemR(strip, "use_crop")
flow = layout.column_flow()
flow.active = strip.use_crop
flow.itemR(strip, "top")
flow.itemR(strip, "left")
flow.itemR(strip, "bottom")
flow.itemR(strip, "right")
"""
class SEQUENCER_PT_filter(SequencerButtonsPanel):
__label__ = "Filter"
__idname__ = "SEQUENCER_PT_filter"
def poll(self, context):
strip = act_strip(context)
if not strip:
return False
return strip.type in ('MOVIE', 'IMAGE', 'SCENE', 'META')
def draw(self, context):
layout = self.layout
strip = act_strip(context)
row = layout.row()
row.itemR(strip, "premultiply")
row.itemR(strip, "convert_float")
row.itemR(strip, "de_interlace")
row = layout.row()
row.itemR(strip, "flip_x")
row.itemR(strip, "flip_y")
row.itemR(strip, "reverse_frames")
row = layout.row()
row.itemR(strip, "multiply_colors")
row.itemR(strip, "strobe")
layout.itemR(strip, "use_color_balance")
class SEQUENCER_PT_proxy(SequencerButtonsPanel):
__label__ = "Proxy"
__idname__ = "SEQUENCER_PT_proxy"
def poll(self, context):
strip = act_strip(context)
if not strip:
return False
return strip.type in ('MOVIE', 'IMAGE', 'SCENE', 'META')
def draw_header(self, context):
strip = act_strip(context)
layout = self.layout
layout.itemR(strip, "use_proxy", text="")
def draw(self, context):
strip = act_strip(context)
layout = self.layout
row = layout.row()
row.itemR(strip, "proxy_custom_directory")
# row.itemR(strip.proxy, "dir") # TODO
bpy.types.register(SEQUENCER_PT_edit)
bpy.types.register(SEQUENCER_PT_effect)
bpy.types.register(SEQUENCER_PT_input)
bpy.types.register(SEQUENCER_PT_filter)
bpy.types.register(SEQUENCER_PT_proxy)

View File

@ -0,0 +1,466 @@
import bpy
def act_strip(context):
try: return context.scene.sequence_editor.active_strip
except: return None
# Header
class SEQUENCER_HT_header(bpy.types.Header):
__space_type__ = "SEQUENCE_EDITOR"
__idname__ = "SEQUENCE_HT_header"
def draw(self, context):
st = context.space_data
layout = self.layout
layout.template_header(context)
if context.area.show_menus:
row = layout.row(align=True)
row.itemM(context, "SEQUENCER_MT_view")
row.itemM(context, "SEQUENCER_MT_select")
row.itemM(context, "SEQUENCER_MT_marker")
row.itemM(context, "SEQUENCER_MT_add")
row.itemM(context, "SEQUENCER_MT_strip")
class SEQUENCER_MT_view(bpy.types.Menu):
__space_type__ = "SEQUENCE_EDITOR"
__label__ = "View (TODO)"
def draw(self, context):
layout = self.layout
st = context.space_data
layout.column()
"""
uiBlock *block= uiBeginBlock(C, ar, "seq_viewmenu", UI_EMBOSSP);
short yco= 0, menuwidth=120;
if (sseq->mainb == SEQ_DRAW_SEQUENCE) {
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
"Play Back Animation "
"in all Sequence Areas|Alt A", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
}
else {
uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL,
"Grease Pencil...", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
uiDefMenuSep(block);
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
"Play Back Animation "
"in this window|Alt A", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
}
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
"Play Back Animation in all "
"3D Views and Sequence Areas|Alt Shift A",
0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
"""
layout.itemS()
layout.itemO("SEQUENCER_OT_view_all")
layout.itemO("SEQUENCER_OT_view_selected")
layout.itemS()
"""
/* Lock Time */
uiDefIconTextBut(block, BUTM, 1, (v2d->flag & V2D_VIEWSYNC_SCREEN_TIME)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
"Lock Time to Other Windows|", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
/* Draw time or frames.*/
uiDefMenuSep(block);
if(sseq->flag & SEQ_DRAWFRAMES)
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Seconds|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
else
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Frames|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
if(!sa->full) uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,0, "");
else uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Tile Window|Ctrl DownArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
"""
class SEQUENCER_MT_select(bpy.types.Menu):
__space_type__ = "SEQUENCE_EDITOR"
__label__ = "Select"
def draw(self, context):
layout = self.layout
st = context.space_data
layout.column()
layout.item_enumO("SEQUENCER_OT_select_active_side", "side", 'LEFT', text="Strips to the Left")
layout.item_enumO("SEQUENCER_OT_select_active_side", "side", 'RIGHT', text="Strips to the Right")
layout.itemS()
layout.item_enumO("SEQUENCER_OT_select_handles", "side", 'BOTH', text="Surrounding Handles")
layout.item_enumO("SEQUENCER_OT_select_handles", "side", 'LEFT', text="Left Handle")
layout.item_enumO("SEQUENCER_OT_select_handles", "side", 'RIGHT', text="Right Handle")
layout.itemS()
layout.itemO("SEQUENCER_OT_select_linked")
layout.itemO("SEQUENCER_OT_select_all_toggle")
layout.itemO("SEQUENCER_OT_select_invert")
class SEQUENCER_MT_marker(bpy.types.Menu):
__space_type__ = "SEQUENCE_EDITOR"
__label__ = "Marker (TODO)"
def draw(self, context):
layout = self.layout
st = context.space_data
layout.column()
layout.itemO("SEQUENCER_OT_sound_strip_add", text="Add Marker|Ctrl Alt M")
layout.itemO("SEQUENCER_OT_sound_strip_add", text="Duplicate Marker|Ctrl Shift D")
layout.itemO("SEQUENCER_OT_sound_strip_add", text="Delete Marker|Shift X")
layout.itemS()
layout.itemO("SEQUENCER_OT_sound_strip_add", text="(Re)Name Marker|Ctrl M")
layout.itemO("SEQUENCER_OT_sound_strip_add", text="Grab/Move Marker|Ctrl G")
layout.itemS()
layout.itemO("SEQUENCER_OT_sound_strip_add", text="Transform Markers") # toggle, will be rna - (sseq->flag & SEQ_MARKER_TRANS)
class SEQUENCER_MT_add(bpy.types.Menu):
__space_type__ = "SEQUENCE_EDITOR"
__label__ = "Add"
def draw(self, context):
layout = self.layout
st = context.space_data
layout.column()
layout.itemO("SEQUENCER_OT_movie_strip_add", text="Movie")
layout.item_booleanO("SEQUENCER_OT_movie_strip_add", "sound", True, text="Movie & Sound") # FFMPEG ONLY
layout.itemO("SEQUENCER_OT_image_strip_add", text="Image")
layout.itemO("SEQUENCER_OT_sound_strip_add", text="Sound (Ram)")
layout.item_booleanO("SEQUENCER_OT_sound_strip_add", "hd", True, text="Sound (Streaming)") # FFMPEG ONLY
layout.itemM(context, "SEQUENCER_MT_add_effect")
class SEQUENCER_MT_add_effect(bpy.types.Menu):
__space_type__ = "SEQUENCE_EDITOR"
__label__ = "Effect Strip..."
def draw(self, context):
layout = self.layout
st = context.space_data
self.layout.column()
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'ADD')
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'SUBTRACT')
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'ALPHA_OVER')
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'ALPHA_UNDER')
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'GAMMA_CROSS')
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'MULTIPLY')
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'OVER_DROP')
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'PLUGIN')
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'WIPE')
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'GLOW')
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'TRANSFORM')
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'COLOR')
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'SPEED')
class SEQUENCER_MT_strip(bpy.types.Menu):
__space_type__ = "SEQUENCE_EDITOR"
__label__ = "Strip"
def draw(self, context):
layout = self.layout
st = context.space_data
# uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
layout.column()
layout.item_enumO("TFM_OT_transform", "mode", 'TRANSLATION', text="Grab/Move")
layout.item_enumO("TFM_OT_transform", "mode", 'TIME_EXTEND', text="Grab/Extend from frame")
# uiItemO(layout, NULL, 0, "SEQUENCER_OT_strip_snap"); // TODO - add this operator
layout.itemS()
layout.item_enumO("SEQUENCER_OT_cut", "type", 'HARD', text="Cut (hard) at frame")
layout.item_enumO("SEQUENCER_OT_cut", "type", 'SOFT', text="Cut (soft) at frame")
layout.itemO("SEQUENCER_OT_images_separate")
layout.itemS()
layout.itemO("SEQUENCER_OT_duplicate_add")
layout.itemO("SEQUENCER_OT_delete")
strip = act_strip(context)
if strip:
stype = strip.type
if stype=='EFFECT':
layout.itemS()
layout.itemO("SEQUENCER_OT_effect_change")
layout.itemO("SEQUENCER_OT_effect_reassign_inputs")
elif stype=='IMAGE':
layout.itemS()
layout.itemO("SEQUENCER_OT_image_change")
elif stype=='SCENE':
layout.itemS()
layout.itemO("SEQUENCER_OT_scene_change", text="Change Scene")
elif stype=='MOVIE':
layout.itemS()
layout.itemO("SEQUENCER_OT_movie_change")
layout.itemS()
layout.itemO("SEQUENCER_OT_meta_make")
layout.itemO("SEQUENCER_OT_meta_separate")
#if (ed && (ed->metastack.first || (ed->act_seq && ed->act_seq->type == SEQ_META))) {
# uiItemS(layout);
# uiItemO(layout, NULL, 0, "SEQUENCER_OT_meta_toggle");
#}
layout.itemS()
layout.itemO("SEQUENCER_OT_reload")
layout.itemS()
layout.itemO("SEQUENCER_OT_lock")
layout.itemO("SEQUENCER_OT_unlock")
layout.itemO("SEQUENCER_OT_mute")
layout.itemO("SEQUENCER_OT_unmute")
layout.item_enumO("SEQUENCER_OT_mute", "type", 'UNSELECTED', text="Mute Deselected Strips")
# Panels
class SequencerButtonsPanel(bpy.types.Panel):
__space_type__ = "SEQUENCE_EDITOR"
__region_type__ = "UI"
def poll(self, context):
return act_strip(context) != None
class SEQUENCER_PT_edit(SequencerButtonsPanel):
__label__ = "Edit Strip"
__idname__ = "SEQUENCER_PT_edit"
def draw(self, context):
layout = self.layout
strip = act_strip(context)
layout.itemR(strip, "name")
layout.itemR(strip, "blend_mode")
layout.itemR(strip, "blend_opacity")
row = layout.row()
row.itemR(strip, "mute")
row.itemR(strip, "lock")
row.itemR(strip, "frame_locked")
row = layout.row()
row.itemR(strip, "channel")
row.itemR(strip, "start_frame")
row = layout.row()
row.itemR(strip, "length")
row.itemR(strip, "type")
class SEQUENCER_PT_effect(SequencerButtonsPanel):
__label__ = "Effect Strip"
__idname__ = "SEQUENCER_PT_effect"
def poll(self, context):
strip = act_strip(context)
if not strip:
return False
return strip.type in ('COLOR', 'WIPE', 'GLOW', 'SPEED', 'TRANSFORM')
def draw(self, context):
layout = self.layout
strip = act_strip(context)
if strip.type == 'COLOR':
layout.itemR(strip, "color")
elif strip.type == 'WIPE':
row = layout.row()
row.itemL(text="Transition Type:")
row.itemL(text="Direction:")
row = layout.row()
row.itemR(strip, "transition_type", text="")
row.itemR(strip, "direction", text="")
row = layout.row()
row.itemR(strip, "blur_width")
if strip.transition_type in ('SINGLE', 'DOUBLE'):
row.itemR(strip, "angle")
elif strip.type == 'GLOW':
flow = layout.column_flow()
flow.itemR(strip, "threshold")
flow.itemR(strip, "clamp")
flow.itemR(strip, "boost_factor")
flow.itemR(strip, "blur_distance")
row = layout.row()
row.itemR(strip, "quality", slider=True)
row.itemR(strip, "only_boost")
elif strip.type == 'SPEED':
layout.itemR(strip, "global_speed")
flow = layout.column_flow()
flow.itemR(strip, "curve_velocity")
flow.itemR(strip, "curve_compress_y")
flow.itemR(strip, "frame_blending")
elif strip.type == 'TRANSFORM':
row = layout.row()
row.itemL(text="Interpolation:")
row.itemL(text="Translation Unit:")
row = layout.row()
row.itemR(strip, "interpolation", text="")
row.itemR(strip, "translation_unit", text="")
split = layout.split()
col = split.column()
sub = col.column(align=True)
sub.itemL(text="Position X:")
sub.itemR(strip, "translate_start_x", text="Start")
sub.itemR(strip, "translate_end_x", text="End")
sub = col.column(align=True)
sub.itemL(text="Scale X:")
sub.itemR(strip, "scale_start_x", text="Start")
sub.itemR(strip, "scale_end_x", text="End")
sub = col.column(align=True)
sub.itemL(text="Rotation:")
sub.itemR(strip, "rotation_start", text="Start")
sub.itemR(strip, "rotation_end", text="End")
col = split.column()
sub = col.column(align=True)
sub.itemL(text="Position Y:")
sub.itemR(strip, "translate_start_y", text="Start")
sub.itemR(strip, "translate_end_y", text="End")
sub = col.column(align=True)
sub.itemL(text="Scale Y:")
sub.itemR(strip, "scale_start_y", text="Start")
sub.itemR(strip, "scale_end_y", text="End")
class SEQUENCER_PT_input(SequencerButtonsPanel):
__label__ = "Strip Input"
__idname__ = "SEQUENCER_PT_input"
def poll(self, context):
strip = act_strip(context)
if not strip:
return False
return strip.type in ('MOVIE', 'IMAGE', 'SCENE', 'META')
def draw(self, context):
layout = self.layout
strip = act_strip(context)
layout.itemR(strip, "directory")
# TODO - get current element!
layout.itemR(strip.elements[0], "filename")
"""
layout.itemR(strip, "use_crop")
flow = layout.column_flow()
flow.active = strip.use_crop
flow.itemR(strip, "top")
flow.itemR(strip, "left")
flow.itemR(strip, "bottom")
flow.itemR(strip, "right")
"""
class SEQUENCER_PT_filter(SequencerButtonsPanel):
__label__ = "Filter"
__idname__ = "SEQUENCER_PT_filter"
def poll(self, context):
strip = act_strip(context)
if not strip:
return False
return strip.type in ('MOVIE', 'IMAGE', 'SCENE', 'META')
def draw(self, context):
layout = self.layout
strip = act_strip(context)
row = layout.row()
row.itemR(strip, "premultiply")
row.itemR(strip, "convert_float")
row.itemR(strip, "de_interlace")
row = layout.row()
row.itemR(strip, "flip_x")
row.itemR(strip, "flip_y")
row.itemR(strip, "reverse_frames")
row = layout.row()
row.itemR(strip, "multiply_colors")
row.itemR(strip, "strobe")
layout.itemR(strip, "use_color_balance")
class SEQUENCER_PT_proxy(SequencerButtonsPanel):
__label__ = "Proxy"
__idname__ = "SEQUENCER_PT_proxy"
def poll(self, context):
strip = act_strip(context)
if not strip:
return False
return strip.type in ('MOVIE', 'IMAGE', 'SCENE', 'META')
def draw_header(self, context):
strip = act_strip(context)
layout = self.layout
layout.itemR(strip, "use_proxy", text="")
def draw(self, context):
strip = act_strip(context)
layout = self.layout
row = layout.row()
row.itemR(strip, "proxy_custom_directory")
# row.itemR(strip.proxy, "dir") # TODO
bpy.types.register(SEQUENCER_HT_header)
bpy.types.register(SEQUENCER_MT_view)
bpy.types.register(SEQUENCER_MT_select)
bpy.types.register(SEQUENCER_MT_marker)
bpy.types.register(SEQUENCER_MT_add)
bpy.types.register(SEQUENCER_MT_add_effect)
bpy.types.register(SEQUENCER_MT_strip)
bpy.types.register(SEQUENCER_PT_edit)
bpy.types.register(SEQUENCER_PT_effect)
bpy.types.register(SEQUENCER_PT_input)
bpy.types.register(SEQUENCER_PT_filter)
bpy.types.register(SEQUENCER_PT_proxy)

View File

@ -612,7 +612,7 @@ void uiItemEnumO_string(uiLayout *layout, char *name, int icon, char *opname, ch
if(prop= RNA_struct_find_property(&ptr, propname)) {
RNA_property_enum_items(&ptr, prop, &item, &totitem);
if(RNA_enum_value_from_id(item, value_str, &value)==0) {
printf("uiItemEnumO_string: %s.%s, enum %s not found.\n", RNA_struct_identifier(ptr.type), propname, value);
printf("uiItemEnumO_string: %s.%s, enum %s not found.\n", RNA_struct_identifier(ptr.type), propname, value_str);
return;
}
}

View File

@ -132,22 +132,6 @@ static int buttons_context_path_world(ButsContextPath *path)
return 0;
}
// XXX - place holder, need to get this working
static int buttons_context_path_sequencer(ButsContextPath *path)
{
Scene *scene;
if(buttons_context_path_scene(path)) {
scene= path->ptr[path->len-1].data;
RNA_pointer_create(&scene->id, &RNA_SequenceEditor, scene->ed, &path->ptr[path->len]);
path->len++;
return 1;
}
return 0;
}
static int buttons_context_path_object(ButsContextPath *path)
{
@ -395,9 +379,6 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
case BCONTEXT_WORLD:
found= buttons_context_path_world(path);
break;
case BCONTEXT_SEQUENCER:
found= buttons_context_path_sequencer(path); // XXX - place holder
break;
case BCONTEXT_OBJECT:
case BCONTEXT_PHYSICS:
case BCONTEXT_CONSTRAINT:

View File

@ -169,8 +169,6 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, "Scene");
if(sbuts->pathflag & (1<<BCONTEXT_WORLD))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_WORLD, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_WORLD, 0, 0, "World");
if(sbuts->pathflag & (1<<BCONTEXT_SEQUENCER))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SEQUENCE, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_SEQUENCER, 0, 0, "Sequencer");
if(sbuts->pathflag & (1<<BCONTEXT_OBJECT))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_OBJECT, 0, 0, "Object");
if(sbuts->pathflag & (1<<BCONTEXT_CONSTRAINT))

View File

@ -185,8 +185,6 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar)
ED_region_panels(C, ar, vertical, "scene");
else if(sbuts->mainb == BCONTEXT_WORLD)
ED_region_panels(C, ar, vertical, "world");
else if(sbuts->mainb == BCONTEXT_SEQUENCER)
ED_region_panels(C, ar, vertical, "sequencer");
else if(sbuts->mainb == BCONTEXT_OBJECT)
ED_region_panels(C, ar, vertical, "object");
else if(sbuts->mainb == BCONTEXT_DATA)

View File

@ -112,7 +112,7 @@ EnumPropertyItem sequencer_prop_effect_types[] = {
{SEQ_ALPHAUNDER, "ALPHA_UNDER", "Alpha Under", "Alpha Under effect strip type"},
{SEQ_GAMCROSS, "GAMMA_CROSS", "Gamma Cross", "Gamma Cross effect strip type"},
{SEQ_MUL, "MULTIPLY", "Multiply", "Multiply effect strip type"},
{SEQ_OVERDROP, "ALPHA_OVER_DROP", "Alpha Over Drop", "Alpha Over Drop effect strip type"},
{SEQ_OVERDROP, "OVER_DROP", "Alpha Over Drop", "Alpha Over Drop effect strip type"},
{SEQ_PLUGIN, "PLUGIN", "Plugin", "Plugin effect strip type"},
{SEQ_WIPE, "WIPE", "Wipe", "Wipe effect strip type"},
{SEQ_GLOW, "GLOW", "Glow", "Glow effect strip type"},

View File

@ -1,454 +0,0 @@
/**
* $Id$
*
* ***** 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,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* The Original Code is Copyright (C) 2008 Blender Foundation.
* All rights reserved.
*
*
* Contributor(s): Blender Foundation
*
* ***** END GPL LICENSE BLOCK *****
*/
#include <string.h>
#include <stdio.h>
#include "DNA_space_types.h"
#include "DNA_sequence_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BKE_utildefines.h"
#include "BKE_context.h"
#include "BKE_screen.h"
#include "BKE_sequence.h"
#include "ED_screen.h"
#include "ED_types.h"
#include "ED_util.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "BIF_transform.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "sequencer_intern.h"
/* ************************ header area region *********************** */
#define B_FULL 1
#define B_VIEW2DZOOM 2
#define B_REDR 3
#define B_IPOBORDER 4
#define B_SEQCLEAR 5
static uiBlock *seq_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
{
ScrArea *sa= CTX_wm_area(C);
SpaceSeq *sseq= sa->spacedata.first;
View2D *v2d= UI_view2d_fromcontext(C);
uiBlock *block= uiBeginBlock(C, ar, "seq_viewmenu", UI_EMBOSSP);
short yco= 0, menuwidth=120;
if (sseq->mainb == SEQ_DRAW_SEQUENCE) {
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
"Play Back Animation "
"in all Sequence Areas|Alt A", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
}
else {
uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL,
"Grease Pencil...", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
uiDefMenuSep(block);
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
"Play Back Animation "
"in this window|Alt A", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
}
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
"Play Back Animation in all "
"3D Views and Sequence Areas|Alt Shift A",
0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
uiDefMenuSep(block);
uiDefMenuButO(block, "SEQUENCER_OT_view_all", NULL);
uiDefMenuButO(block, "SEQUENCER_OT_view_selected", NULL);
uiDefMenuSep(block);
/* Lock Time */
uiDefIconTextBut(block, BUTM, 1, (v2d->flag & V2D_VIEWSYNC_SCREEN_TIME)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
"Lock Time to Other Windows|", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
/* Draw time or frames.*/
uiDefMenuSep(block);
if(sseq->flag & SEQ_DRAWFRAMES)
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Seconds|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
else
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Frames|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
if(!sa->full) uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,0, "");
else uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Tile Window|Ctrl DownArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
if(sa->headertype==HEADERTOP) {
uiBlockSetDirection(block, UI_DOWN);
}
else {
uiBlockSetDirection(block, UI_TOP);
uiBlockFlipOrder(block);
}
uiTextBoundsBlock(block, 50);
uiEndBlock(C, block);
return block;
}
//static uiBlock *seq_selectmenu(bContext *C, ARegion *ar, void *arg_unused)
static void seq_selectmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
uiItemEnumO(layout, "Strips to the Left", 0, "SEQUENCER_OT_select_active_side", "side", SEQ_SIDE_LEFT);
uiItemEnumO(layout, "Strips to the Right", 0, "SEQUENCER_OT_select_active_side", "side", SEQ_SIDE_RIGHT);
uiItemS(layout);
uiItemEnumO(layout, "Surrounding Handles", 0, "SEQUENCER_OT_select_handles", "side", SEQ_SIDE_BOTH);
uiItemEnumO(layout, "Left Handles", 0, "SEQUENCER_OT_select_handles", "side", SEQ_SIDE_LEFT);
uiItemEnumO(layout, "Right Handles", 0, "SEQUENCER_OT_select_handles", "side", SEQ_SIDE_RIGHT);
uiItemS(layout);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_select_linked");
uiItemS(layout);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_select_linked");
uiItemO(layout, NULL, 0, "SEQUENCER_OT_select_all_toggle");
uiItemO(layout, NULL, 0, "SEQUENCER_OT_select_invert");
}
static uiBlock *seq_markermenu(bContext *C, ARegion *ar, void *arg_unused)
{
ScrArea *sa= CTX_wm_area(C);
SpaceSeq *sseq= sa->spacedata.first;
uiBlock *block= uiBeginBlock(C, ar, "seq_markermenu", UI_EMBOSSP);
short yco= 0, menuwidth=120;
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Marker|Ctrl Alt M", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Duplicate Marker|Ctrl Shift D", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Marker|Shift X", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
uiDefMenuSep(block);
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "(Re)Name Marker|Ctrl M", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move Marker|Ctrl G", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
uiDefMenuSep(block);
uiDefIconTextBut(block, BUTM, 1, (sseq->flag & SEQ_MARKER_TRANS)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
"Transform Markers", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
if(sa->headertype==HEADERTOP) {
uiBlockSetDirection(block, UI_DOWN);
}
else {
uiBlockSetDirection(block, UI_TOP);
uiBlockFlipOrder(block);
}
uiTextBoundsBlock(block, 50);
uiEndBlock(C, block);
return block;
}
//static uiBlock *seq_addmenu_effectmenu(bContext *C, ARegion *ar, void *arg_unused)
static void seq_addmenu_effectmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_ADD);
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_SUB);
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_MUL);
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_CROSS);
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_GAMCROSS);
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_ALPHAOVER);
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_ALPHAUNDER);
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_OVERDROP);
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_WIPE);
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_GLOW);
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_TRANSFORM);
/* Color is an effect but moved to the other menu since its not that exciting */
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_SPEED);
uiItemS(layout);
uiItemEnumO(layout, NULL, 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_PLUGIN);
}
//static uiBlock *seq_addmenu(bContext *C, ARegion *ar, void *arg_unused)
static void seq_addmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
uiItemMenuF(layout, "Effects...", 0, seq_addmenu_effectmenu);
uiItemS(layout);
uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
#ifdef WITH_FFMPEG
uiItemBooleanO(layout, "Audio (RAM)", 0, "SEQUENCER_OT_sound_strip_add", "hd", FALSE);
uiItemBooleanO(layout, "Audio (HD)", 0, "SEQUENCER_OT_sound_strip_add", "hd", TRUE);
#else
uiItemO(layout, NULL, 0, "SEQUENCER_OT_sound_strip_add");
#endif
uiItemEnumO(layout, "Add Color Strip", 0, "SEQUENCER_OT_effect_strip_add", "type", SEQ_COLOR);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_image_strip_add");
uiItemO(layout, NULL, 0, "SEQUENCER_OT_movie_strip_add");
uiItemO(layout, NULL, 0, "SEQUENCER_OT_scene_strip_add");
#ifdef WITH_FFMPEG
uiItemBooleanO(layout, "Movie and Sound", 0, "SEQUENCER_OT_movie_strip_add", "sound", TRUE);
#endif
}
//static uiBlock *seq_editmenu(bContext *C, ARegion *ar, void *arg_unused)
static void seq_editmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
Scene *scene= CTX_data_scene(C);
Editing *ed= seq_give_editing(scene, FALSE);
uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_TRANSLATION);
uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_TIME_EXTEND);
// uiItemO(layout, NULL, 0, "SEQUENCER_OT_strip_snap"); // TODO - add this operator
uiItemEnumO(layout, "Cut Hard", 0, "SEQUENCER_OT_cut", "type", SEQ_CUT_HARD);
uiItemEnumO(layout, "Cut Soft", 0, "SEQUENCER_OT_cut", "type", SEQ_CUT_SOFT);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_images_separate");
uiItemS(layout);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_duplicate_add");
uiItemO(layout, NULL, 0, "SEQUENCER_OT_delete");
if (ed && ed->act_seq) {
switch(ed->act_seq->type) {
case SEQ_EFFECT:
uiItemS(layout);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_effect_change");
uiItemO(layout, NULL, 0, "SEQUENCER_OT_effect_reassign_inputs");
break;
case SEQ_IMAGE:
uiItemS(layout);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_image_change"); // Change Scene...
break;
case SEQ_SCENE:
uiItemS(layout);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_scene_change"); // Remap Paths...
break;
case SEQ_MOVIE:
uiItemS(layout);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_movie_change"); // Remap Paths...
break;
}
}
uiItemS(layout);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_meta_make");
uiItemO(layout, NULL, 0, "SEQUENCER_OT_meta_separate");
if (ed && (ed->metastack.first || (ed->act_seq && ed->act_seq->type == SEQ_META))) {
uiItemS(layout);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_meta_toggle");
}
uiItemS(layout);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_reload");
uiItemS(layout);
uiItemO(layout, NULL, 0, "SEQUENCER_OT_lock");
uiItemO(layout, NULL, 0, "SEQUENCER_OT_unlock");
uiItemO(layout, NULL, 0, "SEQUENCER_OT_mute");
uiItemO(layout, NULL, 0, "SEQUENCER_OT_unmute");
uiItemEnumO(layout, "Mute Deselected Strips", 0, "SEQUENCER_OT_mute", "type", SEQ_UNSELECTED);
}
void sequencer_header_buttons(const bContext *C, ARegion *ar)
{
ScrArea *sa= CTX_wm_area(C);
SpaceSeq *sseq= sa->spacedata.first;
Scene *scene= CTX_data_scene(C);
Editing *ed= seq_give_editing(scene, FALSE);
uiBlock *block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS);
int xco=3, yco= 3;
xco= ED_area_header_standardbuttons(C, block, yco);
if((sa->flag & HEADER_NO_PULLDOWN)==0) {
int xmax;
xmax= GetButStringLength("View");
//uiDefMenuBut(block, seq_viewmenu, NULL, "View", xco, 0, xmax-3, 24, ""); // TODO
uiDefPulldownBut(block, seq_viewmenu, sa, "View", xco, 0, xmax-3, 24, "");
xco+=xmax;
xmax= GetButStringLength("Select");
uiDefMenuBut(block, seq_selectmenu, NULL, "Select", xco, 0, xmax-3, 24, "");
//uiDefPulldownBut(block, seq_selectmenu, sa, "Select", xco, 0, xmax-3, 24, "");
xco+=xmax;
xmax= GetButStringLength("Marker");
//uiDefMenuBut(block, seq_markermenu, NULL, "Marker", xco, 0, xmax-3, 24, "");
uiDefPulldownBut(block, seq_markermenu, sa, "Marker", xco, 0, xmax-3, 24, ""); // TODO
xco+=xmax;
xmax= GetButStringLength("Add");
uiDefMenuBut(block, seq_addmenu, NULL, "Add", xco, 0, xmax-3, 24, "");
//uiDefPulldownBut(block, seq_addmenu, sa, "Add", xco, 0, xmax-3, 24, "");
xco+=xmax;
xmax= GetButStringLength("Strip");
uiDefMenuBut(block, seq_editmenu, NULL, "Strip", xco, 0, xmax-3, 24, "");
//uiDefPulldownBut(block, seq_editmenu, sa, "Strip", xco, 0, xmax-3, 24, "");
xco+=xmax;
}
uiBlockSetEmboss(block, UI_EMBOSS);
/* IMAGE */
uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_SEQ_SEQUENCER,
"Image Preview: %t"
"|Sequence %x0"
"|Image Preview %x1"
"|Luma Waveform %x2"
"|Chroma Vectorscope %x3"
"|Histogram %x4",
xco,yco,XIC+10,YIC, &sseq->mainb, 0.0, 3.0,
0, 0,
"Shows the sequence output image preview");
xco+= 8 + XIC+10;
if(sseq->mainb != SEQ_DRAW_SEQUENCE) {
int minchan = 0;
/* CHANNEL shown in image preview */
if (ed && ed->metastack.first)
minchan = -BLI_countlist(&ed->metastack);
uiDefButS(block, NUM, B_REDR, "Chan:",
xco, yco, 3.5 * XIC,YIC,
&sseq->chanshown, minchan, MAXSEQ, 0, 0,
"The channel number shown in the image preview. 0 is the result of all strips combined.");
xco+= 8 + XIC*3.5;
if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
uiDefButS(block, MENU, B_REDR,
"Show zebra: %t"
"|Z 110 %x110"
"|Z 100 %x100"
"|Z 95 %x95"
"|Z 90 %x90"
"|Z 70 %x70"
"|Z Off %x0",
xco,yco,3.0 * XIC, YIC, &sseq->zebra,
0,0,0,0,
"Show overexposed "
"areas with zebra stripes");
xco+= 8 + XIC*3.0;
uiDefButBitI(block, TOG, SEQ_DRAW_SAFE_MARGINS,
B_REDR, "T",
xco,yco,XIC,YIC, &sseq->flag,
0, 0, 0, 0,
"Draw title safe margins in preview");
xco+= 8 + XIC;
}
if (sseq->mainb == SEQ_DRAW_IMG_WAVEFORM) {
uiDefButBitI(block, TOG, SEQ_DRAW_COLOR_SEPERATED,
B_REDR, "CS",
xco,yco,XIC,YIC, &sseq->flag,
0, 0, 0, 0,
"Seperate color channels in preview");
xco+= 8 + XIC;
}
} else {
/* ZOOM and BORDER */
static int viewmovetemp; // XXX dummy var
uiBlockBeginAlign(block);
uiDefIconButI(block, TOG, B_VIEW2DZOOM,
ICON_VIEWZOOM,
xco,yco,XIC,YIC, &viewmovetemp,
0, 0, 0, 0,
"Zooms view in and out (Ctrl MiddleMouse)");
xco += XIC;
uiDefIconButO(block, BUT, "VIEW2D_OT_zoom_border", WM_OP_INVOKE_REGION_WIN, ICON_BORDERMOVE, xco,yco,XIC,YIC, "Zooms view to fit area");
uiBlockEndAlign(block);
xco += 8 + XIC;
}
uiDefButO(block, BUT, "SEQUENCER_OT_refresh_all", WM_OP_EXEC_DEFAULT, "Refresh", xco, yco, 3*XIC, YIC, "Clears all buffered images in memory");
uiBlockSetEmboss(block, UI_EMBOSS);
/* always as last */
UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin);
uiEndBlock(C, block);
uiDrawBlock(C, block);
}

View File

@ -46,7 +46,7 @@ struct Scene;
struct ARegion *sequencer_has_buttons_region(struct ScrArea *sa);
/* sequencer_header.c */
void sequencer_header_buttons(const struct bContext *C, struct ARegion *ar);
// void sequencer_header_buttons(const struct bContext *C, struct ARegion *ar);
/* sequencer_draw.c */
void drawseqspace(const struct bContext *C, struct ARegion *ar);

View File

@ -198,29 +198,12 @@ static void sequencer_main_area_init(wmWindowManager *wm, ARegion *ar)
/* add handlers, stuff you only do once or on area/region changes */
static void sequencer_header_area_init(wmWindowManager *wm, ARegion *ar)
{
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
ED_region_header_init(ar);
}
static void sequencer_header_area_draw(const bContext *C, ARegion *ar)
{
float col[3];
/* clear */
if(ED_screen_area_active(C))
UI_GetThemeColor3fv(TH_HEADER, col);
else
UI_GetThemeColor3fv(TH_HEADERDESEL, col);
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
/* set view2d view matrix for scrolling (without scrollers) */
UI_view2d_view_ortho(C, &ar->v2d);
sequencer_header_buttons(C, ar);
/* restore view matrix? */
UI_view2d_view_restore(C);
ED_region_header(C, ar);
}
static void sequencer_main_area_listener(ARegion *ar, wmNotifier *wmn)
@ -298,7 +281,9 @@ void ED_spacetype_sequencer(void)
art->draw= sequencer_buttons_area_draw;
BLI_addhead(&st->regiontypes, art);
/* Keep as python only for now
sequencer_buttons_register(art);
*/
/* regions: header */
art= MEM_callocN(sizeof(ARegionType), "spacetype sequencer region");
@ -311,7 +296,6 @@ void ED_spacetype_sequencer(void)
BLI_addhead(&st->regiontypes, art);
BKE_spacetype_register(st);
}

View File

@ -477,7 +477,6 @@ typedef struct SpaceImaSel {
#define BCONTEXT_GAME 8
#define BCONTEXT_BONE 9
#define BCONTEXT_MODIFIER 10
#define BCONTEXT_SEQUENCER 11
#define BCONTEXT_CONSTRAINT 12
#define BCONTEXT_TOT 13

View File

@ -251,7 +251,7 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_SUB, "SUBTRACT", "Subtract", ""},
{SEQ_ALPHAOVER, "ALPHA_OVER", "Alpha Over", ""},
{SEQ_ALPHAUNDER, "ALPHA_UNDER", "Alpha Under", ""},
{SEQ_GAMCROSS, "GAMMA_ACROSS", "Gamma Cross", ""},
{SEQ_GAMCROSS, "GAMMA_CROSS", "Gamma Cross", ""},
{SEQ_MUL, "MULTIPLY", "Multiply", ""},
{SEQ_OVERDROP, "OVER_DROP", "Over Drop", ""},
{SEQ_PLUGIN, "PLUGIN", "plugin", ""},

View File

@ -499,7 +499,6 @@ static void rna_def_space_buttons(BlenderRNA *brna)
{BCONTEXT_GAME, "GAME", "Game", ""},
{BCONTEXT_BONE, "BONE", "Bone", ""},
{BCONTEXT_MODIFIER, "MODIFIER", "Modifier", ""},
{BCONTEXT_SEQUENCER, "SEQUENCER", "Sequencer", ""},
{BCONTEXT_CONSTRAINT, "CONSTRAINT", "Constraint", ""},
{0, NULL, NULL, NULL}};