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:
@@ -228,6 +228,10 @@ const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
|
||||
* chars since blender doesnt limit this */
|
||||
return result;
|
||||
}
|
||||
else if(PyBytes_Check(py_str)) {
|
||||
PyErr_Clear();
|
||||
return PyBytes_AS_STRING(py_str);
|
||||
}
|
||||
else {
|
||||
/* mostly copied from fileio.c's, fileio_init */
|
||||
PyObject *stringobj;
|
||||
|
||||
Reference in New Issue
Block a user