diff --git a/packer/packer.py b/packer/packer.py index d1e536f..106778b 100755 --- a/packer/packer.py +++ b/packer/packer.py @@ -119,7 +119,7 @@ class FPElem_sequence_single(FPElem): def _set_cb(self, filepath): block, path, sub_block, sub_path = self.userdata - # TODO, pathname + # TODO, os.sep a, b = filepath.rsplit(b'/', 1) block[path] = a + b'/' @@ -403,25 +403,24 @@ class FilePath: item_type = item.get(b'type', sdna_index_refine=sdna_index_Sequence) if item_type >= C_defs.SEQ_TYPE_EFFECT: - continue + pass elif item_type == C_defs.SEQ_TYPE_META: - yield from aaa(bf_utils.iter_ListBase(item.get_pointer(b'seqbase.first', sdna_index_refine=sdna_index_Sequence))) - continue + yield from seqbase(bf_utils.iter_ListBase(item.get_pointer(b'seqbase.first', sdna_index_refine=sdna_index_Sequence))) + else: + item_strip = item.get_pointer(b'strip', sdna_index_refine=sdna_index_Sequence) + if item_strip is None: # unlikely! + continue + item_stripdata = item_strip.get_pointer(b'stripdata') - item_strip = item.get_pointer(b'strip', sdna_index_refine=sdna_index_Sequence) - if item_strip is None: # unlikely! - continue - item_stripdata = item_strip.get_pointer(b'stripdata') - - if item_type == C_defs.SEQ_TYPE_IMAGE: - # TODO, multiple images - yield FPElem_sequence_single(basedir, level, (item_strip, b'dir', item_stripdata, b'name')), rootdir - elif item_type == C_defs.SEQ_TYPE_MOVIE: - yield FPElem_sequence_single(basedir, level, (item_strip, b'dir', item_stripdata, b'name')), rootdir - elif item_type == C_defs.SEQ_TYPE_SOUND_RAM: - pass - elif item_type == C_defs.SEQ_TYPE_SOUND_HD: - pass + if item_type == C_defs.SEQ_TYPE_IMAGE: + # TODO, multiple images + yield FPElem_sequence_single(basedir, level, (item_strip, b'dir', item_stripdata, b'name')), rootdir + elif item_type == C_defs.SEQ_TYPE_MOVIE: + yield FPElem_sequence_single(basedir, level, (item_strip, b'dir', item_stripdata, b'name')), rootdir + elif item_type == C_defs.SEQ_TYPE_SOUND_RAM: + pass + elif item_type == C_defs.SEQ_TYPE_SOUND_HD: + pass yield from seqbase(bf_utils.iter_ListBase(block_ed.get_pointer(b'seqbase.first')))