diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-02 08:10:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-02 08:10:16 +0400 |
commit | 3d81ee3e4aaa5f146c5fb36cef8ad3ec5a81100f (patch) | |
tree | ebd4d5469652a7df95b85d4b3ef6de377fc4c23d /release/scripts/ui/space_sequencer.py | |
parent | a08648ab53d4a5b4dd998e326653def22de841ea (diff) |
fix for sequencer panel registration, a parent class panel was being registered as well as its children which crashed running the poll() function.
theres not much point in having 3 classes here, just use 1.
Diffstat (limited to 'release/scripts/ui/space_sequencer.py')
-rw-r--r-- | release/scripts/ui/space_sequencer.py | 111 |
1 files changed, 30 insertions, 81 deletions
diff --git a/release/scripts/ui/space_sequencer.py b/release/scripts/ui/space_sequencer.py index abae5f23f6b..0aaf25635b6 100644 --- a/release/scripts/ui/space_sequencer.py +++ b/release/scripts/ui/space_sequencer.py @@ -528,15 +528,41 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, bpy.types.Panel): 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'MULTICAM', 'SPEED') - def draw_filename(self, context): - pass - def draw(self, context): layout = self.layout strip = act_strip(context) - self.draw_filename(context) + seq_type = strip.type + + # draw a filename if we have one + if seq_type == 'IMAGE': + split = layout.split(percentage=0.2) + col = split.column() + col.label(text="Path:") + col = split.column() + col.prop(strip, "directory", text="") + + # Current element for the filename + + elem = strip.getStripElem(context.scene.frame_current) + if elem: + split = layout.split(percentage=0.2) + col = split.column() + col.label(text="File:") + col = split.column() + col.prop(elem, "filename", text="") # strip.elements[0] could be a fallback + + elif seq_type == 'MOVIE': + split = layout.split(percentage=0.2) + col = split.column() + col.label(text="Path:") + col = split.column() + col.prop(strip, "filepath", text="") + col.prop(strip, "mpeg_preseek", text="MPEG Preseek") + # TODO, sound??? + # end drawing filename + layout.prop(strip, "use_translation", text="Image Offset:") if strip.use_translation: @@ -558,83 +584,6 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, bpy.types.Panel): col.prop(strip, "animation_end_offset", text="End") -class SEQUENCER_PT_input_movie(SEQUENCER_PT_input): - bl_label = "Strip Input" - - def poll(self, context): - if not self.has_sequencer(context): - return False - - strip = act_strip(context) - if not strip: - return False - - return strip.type == 'MOVIE' - - def draw_filename(self, context): - layout = self.layout - - strip = act_strip(context) - - split = layout.split(percentage=0.2) - col = split.column() - col.label(text="Path:") - col = split.column() - col.prop(strip, "filepath", text="") - col.prop(strip, "mpeg_preseek", text="MPEG Preseek") - - -class SEQUENCER_PT_input_image(SEQUENCER_PT_input): - bl_label = "Strip Input" - - def poll(self, context): - if not self.has_sequencer(context): - return False - - strip = act_strip(context) - if not strip: - return False - - return strip.type == 'IMAGE' - - def draw_filename(self, context): - layout = self.layout - - strip = act_strip(context) - - split = layout.split(percentage=0.2) - col = split.column() - col.label(text="Path:") - col = split.column() - col.prop(strip, "directory", text="") - - # Current element for the filename - - elem = strip.getStripElem(context.scene.frame_current) - if elem: - split = layout.split(percentage=0.2) - col = split.column() - col.label(text="File:") - col = split.column() - col.prop(elem, "filename", text="") # strip.elements[0] could be a fallback - - -class SEQUENCER_PT_input_secondary(SEQUENCER_PT_input): - bl_label = "Strip Input" - - def poll(self, context): - if not self.has_sequencer(context): - return False - - strip = act_strip(context) - if not strip: - return False - - return strip.type in ('SCENE', 'META') - - def draw_filename(self, context): - pass - class SEQUENCER_PT_sound(SequencerButtonsPanel, bpy.types.Panel): bl_label = "Sound" |