diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-08 22:58:07 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-08 22:58:07 +0400 |
commit | 9b31cba74e2bd84e9988ebdab723e6e43f9b8357 (patch) | |
tree | fb8e8e539247f916784fb967387641f7a9291ace /intern/cycles/util/util_path.cpp | |
parent | 6b134ae357188358f1437650924ab38886386860 (diff) |
Cycles: some warning fixes, cpu device task tweaks, avoid unnecessary
tonemap in non-viewport render, and some utility functions.
Diffstat (limited to 'intern/cycles/util/util_path.cpp')
-rw-r--r-- | intern/cycles/util/util_path.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp index 6f76e378dc2..086063bcb81 100644 --- a/intern/cycles/util/util_path.cpp +++ b/intern/cycles/util/util_path.cpp @@ -27,6 +27,7 @@ OIIO_NAMESPACE_USING #define BOOST_FILESYSTEM_VERSION 2 #include <boost/filesystem.hpp> +#include <boost/algorithm/string.hpp> CCL_NAMESPACE_BEGIN @@ -60,6 +61,18 @@ string path_join(const string& dir, const string& file) return (boost::filesystem::path(dir) / boost::filesystem::path(file)).string(); } +string path_escape(const string& path) +{ + string result = path; + boost::replace_all(result, " ", "\\ "); + return result; +} + +bool path_exists(const string& path) +{ + return boost::filesystem::exists(path); +} + string path_files_md5_hash(const string& dir) { /* computes md5 hash of all files in the directory */ |