Cycles: some warning fixes, cpu device task tweaks, avoid unnecessary

tonemap in non-viewport render, and some utility functions.
This commit is contained in:
Brecht Van Lommel
2011-09-08 18:58:07 +00:00
parent 6b134ae357
commit 9b31cba74e
18 changed files with 170 additions and 136 deletions

View File

@@ -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 */