24 #include "../system/FreestyleConfig.h"
25 #include "../system/StringUtils.h"
33 Path *Path::_pInstance =
nullptr;
43 void Path::setRootDir(
const string &iRootDir)
45 _ProjectDir = iRootDir + string(
DIR_SEP) +
"freestyle";
47 _PatternsPath = _ProjectDir + string(
DIR_SEP) +
"data" + string(
DIR_SEP) +
"textures" +
49 _BrushesPath = _ProjectDir + string(
DIR_SEP) +
"data" + string(
DIR_SEP) +
"textures" +
51 _EnvMapDir = _ProjectDir + string(
DIR_SEP) +
"data" + string(
DIR_SEP) +
"env_map" +
56 void Path::setHomeDir(
const string &iHomeDir)
71 string Path::getEnvVar(
const string &iEnvVarName)
74 if (!getenv(iEnvVarName.c_str())) {
75 cerr <<
"Warning: You may want to set the $" << iEnvVarName
76 <<
" environment variable to use Freestyle." << endl
77 <<
" Otherwise, the current directory will be used instead." << endl;
81 value = getenv(iEnvVarName.c_str());
const char * BKE_appdir_folder_id(const int folder_id, const char *subfolder)