[Bf-extensions-cvs] [510cd44] master: Use relative import

Sybren A. Stüvel noreply at git.blender.org
Thu Sep 15 14:41:02 CEST 2016


Commit: 510cd44a72ef35aaca96eef192f209b63318a54b
Author: Sybren A. Stüvel
Date:   Thu Sep 15 14:40:36 2016 +0200
Branches: master
https://developer.blender.org/rBA510cd44a72ef35aaca96eef192f209b63318a54b

Use relative import

This way the import statements remain the same in both Blender's
io_blend_utils module and BAM.

===================================================================

M	io_blend_utils/blend/blendfile_path_walker.py

===================================================================

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



More information about the Bf-extensions-cvs mailing list