Use relative import

This way the code can remain the same in both Blender's io_blend_utils
module and BAM.
This commit is contained in:
2016-09-15 14:35:53 +02:00
parent 796a24e6b5
commit a404ed8fdb

View File

@@ -395,7 +395,7 @@ class FilePath:
# store info to pass along with each iteration # store info to pass along with each iteration
extra_info = rootdir, os.path.basename(filepath) extra_info = rootdir, os.path.basename(filepath)
from bam.blend import blendfile from . import blendfile
with blendfile.open_blend(filepath_tmp, "rb" if readonly else "r+b") as blend: with blendfile.open_blend(filepath_tmp, "rb" if readonly else "r+b") as blend:
for code in blend.code_index.keys(): for code in blend.code_index.keys():
@@ -627,7 +627,7 @@ class bf_utils:
def iter_array(block, length=-1): def iter_array(block, length=-1):
assert(block.code == b'DATA') assert(block.code == b'DATA')
from bam.blend import blendfile from . import blendfile
import os import os
handle = block.file.handle handle = block.file.handle
header = block.file.header header = block.file.header