Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/ui/buttons_sequencer.py159
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c13
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c4
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c2
-rw-r--r--source/blender/makesdna/DNA_space_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_sequence.c8
-rw-r--r--source/blender/makesrna/intern/rna_space.c1
7 files changed, 186 insertions, 2 deletions
diff --git a/release/ui/buttons_sequencer.py b/release/ui/buttons_sequencer.py
new file mode 100644
index 00000000000..61f780c541d
--- /dev/null
+++ b/release/ui/buttons_sequencer.py
@@ -0,0 +1,159 @@
+
+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)
+
+ row = layout.row()
+ row.itemR(strip, "name")
+
+ row = layout.row()
+ row.itemR(strip, "blend_mode")
+
+ row = layout.row()
+ row.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
+
+ # This is a crummy way to detect effects
+ return strip.type in ('REPLACE', 'CROSS', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER', 'GAMMA_ACROSS', 'MULTIPLY', 'OVER_DROP', 'PLUGIN', 'WIPE', 'GLOW', 'COLOR', 'SPEED')
+
+ def draw(self, context):
+ layout = self.layout
+
+ strip = act_strip(context)
+
+ if strip.type == 'COLOR':
+ row = layout.row()
+ row.itemR(strip, "color")
+ # More Todo - maybe give each its own panel?
+
+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)
+
+ row = layout.row()
+ row.itemR(strip, "directory")
+
+ # TODO - get current element!
+ row = layout.row()
+ row.itemR(strip.elements[0], "filename")
+
+
+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")
+
+ row = layout.row()
+ row.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)
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 3e6fa9c6cff..029fc75f0ae 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -96,6 +96,16 @@ 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)
+{
+ PointerRNA *ptr= &path->ptr[path->len-1];
+
+ /* this one just verifies */
+ return RNA_struct_is_a(ptr->type, &RNA_Scene);
+}
+
+
static int buttons_context_path_object(ButsContextPath *path)
{
Scene *scene;
@@ -302,6 +312,9 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path)
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_MODIFIER:
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c
index 03b2ce9d11c..12ee528f8e0 100644
--- a/source/blender/editors/space_buttons/buttons_header.c
+++ b/source/blender/editors/space_buttons/buttons_header.c
@@ -182,6 +182,9 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
if(!ob && !ELEM(sbuts->mainb, (float)BCONTEXT_SCENE, (float)BCONTEXT_WORLD))
sbuts->mainb = (float)BCONTEXT_WORLD;
+
+ if(!ob && !ELEM(sbuts->mainb, (float)BCONTEXT_SCENE, (float)BCONTEXT_SEQUENCER))
+ sbuts->mainb = (float)BCONTEXT_SEQUENCER;
if((ob && ELEM5(ob->type, OB_EMPTY, OB_MBALL, OB_LAMP, OB_CAMERA, OB_ARMATURE)) && (sbuts->mainb == (float) BCONTEXT_MODIFIER))
sbuts->mainb = (float)BCONTEXT_DATA;
@@ -190,6 +193,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
uiBlockBeginAlign(block);
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, xco, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, "Scene");
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_WORLD, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_WORLD, 0, 0, "World");
+ uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SEQUENCE, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_SEQUENCER, 0, 0, "Sequencer");
// Specific panels, check on active object seletion
if(ob) {
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 57ca7cc23d8..35b398fbbb7 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -176,6 +176,8 @@ 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)
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index b2c5121c1ed..b32be6cb369 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -477,6 +477,7 @@ typedef struct SpaceImaSel {
#define BCONTEXT_GAME 8
#define BCONTEXT_BONE 9
#define BCONTEXT_MODIFIER 10
+#define BCONTEXT_SEQUENCER 11
/* sbuts->flag */
diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c
index 302e7623b18..813a3bf39e8 100644
--- a/source/blender/makesrna/intern/rna_sequence.c
+++ b/source/blender/makesrna/intern/rna_sequence.c
@@ -308,9 +308,9 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MUTE);
RNA_def_property_ui_text(prop, "Mute", "");
- prop= RNA_def_property(srna, "ipo_frame_locked", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "frame_locked", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_IPO_FRAME_LOCKED);
- RNA_def_property_ui_text(prop, "IPO Frame Locked", "Lock the IPO coordinates to the global frame counter.");
+ RNA_def_property_ui_text(prop, "Frame Locked", "Lock the animation curve to the global frame counter.");
prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LOCK);
@@ -385,6 +385,10 @@ void rna_def_editor(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Sequence");
RNA_def_property_ui_text(prop, "Meta Stack", "Meta strip stack, last is currently edited meta strip.");
RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_SequenceEdtior_meta_stack_get", 0, 0, 0);
+
+ prop= RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "act_seq");
+ RNA_def_property_ui_text(prop, "Active Strip", "Sequencers active strip");
}
static void rna_def_filter_video(StructRNA *srna)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 55c56beea7c..fc0cd36c1ad 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -488,6 +488,7 @@ static void rna_def_space_buttons(BlenderRNA *brna)
{BCONTEXT_GAME, "GAME", "Game", ""},
{BCONTEXT_BONE, "BONE", "Bone", ""},
{BCONTEXT_MODIFIER, "MODIFIER", "Modifier", ""},
+ {BCONTEXT_SEQUENCER, "SEQUENCER", "Sequencer", ""},
{0, NULL, NULL, NULL}};
static EnumPropertyItem panel_alignment_items[] = {