Cycles: some warning fixes, cpu device task tweaks, avoid unnecessary
tonemap in non-viewport render, and some utility functions.
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user