[Bf-blender-cvs] [d980c3e] master: Further fix for T37817: non-ascii paths fix in Cycles broke OSL rendering.

Brecht Van Lommel noreply at git.blender.org
Tue Jan 14 20:01:37 CET 2014


Commit: d980c3eccbd020a9ff7137659e7cbfbc5adb125d
Author: Brecht Van Lommel
Date:   Tue Jan 14 19:15:58 2014 +0100
https://developer.blender.org/rBd980c3eccbd020a9ff7137659e7cbfbc5adb125d

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.

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

M	intern/cycles/util/util_path.cpp

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

diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp
index 9ee51f2..1a0bf88 100644
--- a/intern/cycles/util/util_path.cpp
+++ b/intern/cycles/util/util_path.cpp
@@ -42,19 +42,19 @@ static string cached_user_path = "";
 static boost::filesystem::path to_boost(const string& path)
 {
 #ifdef _MSC_VER
-	std::wstring path_utf16 = Strutil::utf8_to_utf16(path);
-	return boost::filesystem::path(path_utf16);
+	std::wstring path_utf16 = Strutil::utf8_to_utf16(path.c_str());
+	return boost::filesystem::path(path_utf16.c_str());
 #else
-	return boost::filesystem::path(path);
+	return boost::filesystem::path(path.c_str());
 #endif
 }
 
 static string from_boost(const boost::filesystem::path& path)
 {
 #ifdef _MSC_VER
-	return Strutil::utf16_to_utf8(path.wstring());
+	return Strutil::utf16_to_utf8(path.wstring().c_str());
 #else
-	return path.string();
+	return path.string().c_str();
 #endif
 }




More information about the Bf-blender-cvs mailing list