Pythons path functions - os.walk(). os.path.exists(). etc support bytes for paths as well as strings, support this with blender/rna too.

- bpy.data.*.load() functions were only accepting UTF-8 paths.
- rna functions/properties now accept byte values rather then strings for file paths.
- bpy.path.resolve_ncase now supports byte objects.
This commit is contained in:
Campbell Barton
2011-02-01 04:24:47 +00:00
parent b17bbf9d95
commit 0362d19f2d
5 changed files with 11 additions and 8 deletions

View File

@@ -129,7 +129,7 @@ def resolve_ncase(path):
import os
def _ncase_path_found(path):
if path == "" or os.path.exists(path):
if not path or os.path.exists(path):
return path, True
filename = os.path.basename(path) # filename may be a directory or a file