forked from bartvdbraak/blender
Further fix for T37817: non-ascii paths fix in Cycles broke OSL rendering.
Not quite sure yet what is going on here, but this works for me.
This commit is contained in:
parent
6e8321f2c0
commit
d980c3eccb
@ -42,19 +42,19 @@ static string cached_user_path = "";
|
|||||||
static boost::filesystem::path to_boost(const string& path)
|
static boost::filesystem::path to_boost(const string& path)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
std::wstring path_utf16 = Strutil::utf8_to_utf16(path);
|
std::wstring path_utf16 = Strutil::utf8_to_utf16(path.c_str());
|
||||||
return boost::filesystem::path(path_utf16);
|
return boost::filesystem::path(path_utf16.c_str());
|
||||||
#else
|
#else
|
||||||
return boost::filesystem::path(path);
|
return boost::filesystem::path(path.c_str());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static string from_boost(const boost::filesystem::path& path)
|
static string from_boost(const boost::filesystem::path& path)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
return Strutil::utf16_to_utf8(path.wstring());
|
return Strutil::utf16_to_utf8(path.wstring().c_str());
|
||||||
#else
|
#else
|
||||||
return path.string();
|
return path.string().c_str();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user