Path remapping for packing

This commit changes how relative paths are handled depending on weather they are nested or not.

Layout is as follows.

- ./shots/01/shot_01.blend
- ./shots/01/maps/special.png
- ./maps/generic.png

Maps to...
- ./shot_01.blend
- ./_maps/special.png
- ./maps/generic.png
This commit is contained in:
2014-11-26 18:47:21 +01:00
parent afcb6acf5d
commit 673b0b0187
4 changed files with 146 additions and 39 deletions

View File

@@ -269,7 +269,7 @@ class FilePath:
return blend.find_blocks_from_code(b'LI')
if temp_remap_cb is not None:
filepath_tmp = temp_remap_cb(filepath, level)
filepath_tmp = temp_remap_cb(filepath, rootdir)
else:
filepath_tmp = filepath