diff --git a/modules/blendfile_pack.py b/modules/blendfile_pack.py index 989bf97..7c839be 100755 --- a/modules/blendfile_pack.py +++ b/modules/blendfile_pack.py @@ -54,7 +54,8 @@ def _relpath_remap( ): import os - + assert(os.path.isabs(path_src)) + path_src = os.path.normpath(path_src) path_dst = os.path.relpath(path_src, base_dir_src) if blendfile_src_dir_fakeroot is None: @@ -77,8 +78,10 @@ def _relpath_remap( path_dst = os.path.normpath(path_dst) path_dst = b'_' + path_dst - path_dst_final = os.path.join(os.path.relpath(fp_basedir, base_dir_src), path_dst) + # _dbg(b"FINAL A: " + path_dst) + path_dst_final = os.path.join(os.path.relpath(base_dir_src, fp_basedir), path_dst) path_dst_final = os.path.normpath(path_dst_final) + # _dbg(b"FINAL B: " + path_dst_final) return path_dst, path_dst_final diff --git a/modules/blendfile_path_walker.py b/modules/blendfile_path_walker.py index cd5f7f5..ee2db9f 100644 --- a/modules/blendfile_path_walker.py +++ b/modules/blendfile_path_walker.py @@ -95,10 +95,10 @@ class FPElem: def filepath_absolute(self): filepath = self.filepath if filepath.startswith(b'//'): - return os.path.join( + return os.path.normpath(os.path.join( self.basedir, utils.compatpath(filepath[2:]), - ) + )) else: return utils.compatpath(filepath) @@ -269,8 +269,9 @@ class FilePath: if block_codes_idlib is not None: def iter_blocks_idlib(): for block in blend.find_blocks_from_code(b'LI'): - if block[b'name'] in block_codes_idlib: - yield from block_expand(block, b'LI') + # TODO, this should work but in fact mades some libs not link correctly. + # if block[b'name'] in block_codes_idlib: + yield from block_expand(block, b'LI') else: def iter_blocks_idlib(): return blend.find_blocks_from_code(b'LI')