diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/freestyle/intern/application/AppConfig.cpp | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/freestyle/intern/application/AppConfig.cpp')
-rw-r--r-- | source/blender/freestyle/intern/application/AppConfig.cpp | 73 |
1 files changed, 37 insertions, 36 deletions
diff --git a/source/blender/freestyle/intern/application/AppConfig.cpp b/source/blender/freestyle/intern/application/AppConfig.cpp index 20d8c68ef0e..3e3a939a8fe 100644 --- a/source/blender/freestyle/intern/application/AppConfig.cpp +++ b/source/blender/freestyle/intern/application/AppConfig.cpp @@ -37,61 +37,62 @@ namespace Config { Path *Path::_pInstance = 0; Path::Path() { - // get the root directory - // soc - setRootDir(BKE_appdir_folder_id(BLENDER_SYSTEM_SCRIPTS, NULL)); + // get the root directory + // soc + setRootDir(BKE_appdir_folder_id(BLENDER_SYSTEM_SCRIPTS, NULL)); - _pInstance = this; + _pInstance = this; } -void Path::setRootDir(const string& iRootDir) +void Path::setRootDir(const string &iRootDir) { - _ProjectDir = iRootDir + string(DIR_SEP.c_str()) + "freestyle"; - _ModelsPath = ""; - _PatternsPath = _ProjectDir + string(DIR_SEP.c_str()) + "data" + string(DIR_SEP.c_str()) + "textures" + - string(DIR_SEP.c_str()) + "variation_patterns" + string(DIR_SEP.c_str()); - _BrushesPath = _ProjectDir + string(DIR_SEP.c_str()) + "data" + string(DIR_SEP.c_str()) + "textures" + - string(DIR_SEP.c_str()) + "brushes" + string(DIR_SEP.c_str()); - _PythonPath = _ProjectDir + string(DIR_SEP.c_str()) + "modules" + string(DIR_SEP.c_str()); - if (getenv("PYTHONPATH")) { - _PythonPath += string(PATH_SEP.c_str()) + string(getenv("PYTHONPATH")); - } - _EnvMapDir = _ProjectDir + string(DIR_SEP.c_str()) + "data" + string(DIR_SEP.c_str()) + "env_map" + - string(DIR_SEP.c_str()); - _MapsDir = _ProjectDir + string(DIR_SEP.c_str()) + "data" + string(DIR_SEP.c_str()) + "maps" + - string(DIR_SEP.c_str()); + _ProjectDir = iRootDir + string(DIR_SEP.c_str()) + "freestyle"; + _ModelsPath = ""; + _PatternsPath = _ProjectDir + string(DIR_SEP.c_str()) + "data" + string(DIR_SEP.c_str()) + + "textures" + string(DIR_SEP.c_str()) + "variation_patterns" + + string(DIR_SEP.c_str()); + _BrushesPath = _ProjectDir + string(DIR_SEP.c_str()) + "data" + string(DIR_SEP.c_str()) + + "textures" + string(DIR_SEP.c_str()) + "brushes" + string(DIR_SEP.c_str()); + _PythonPath = _ProjectDir + string(DIR_SEP.c_str()) + "modules" + string(DIR_SEP.c_str()); + if (getenv("PYTHONPATH")) { + _PythonPath += string(PATH_SEP.c_str()) + string(getenv("PYTHONPATH")); + } + _EnvMapDir = _ProjectDir + string(DIR_SEP.c_str()) + "data" + string(DIR_SEP.c_str()) + + "env_map" + string(DIR_SEP.c_str()); + _MapsDir = _ProjectDir + string(DIR_SEP.c_str()) + "data" + string(DIR_SEP.c_str()) + "maps" + + string(DIR_SEP.c_str()); } -void Path::setHomeDir(const string& iHomeDir) +void Path::setHomeDir(const string &iHomeDir) { - _HomeDir = iHomeDir; + _HomeDir = iHomeDir; } Path::~Path() { - _pInstance = 0; + _pInstance = 0; } Path *Path::getInstance() { - return _pInstance; + return _pInstance; } -string Path::getEnvVar(const string& iEnvVarName) +string Path::getEnvVar(const string &iEnvVarName) { - string value; - if (!getenv(iEnvVarName.c_str())) { - cerr << "Warning: You may want to set the $" << iEnvVarName << - " environment variable to use Freestyle." << endl << - " Otherwise, the current directory will be used instead." << endl; - value = "."; - } - else { - value = getenv(iEnvVarName.c_str()); - } - return value; + string value; + if (!getenv(iEnvVarName.c_str())) { + cerr << "Warning: You may want to set the $" << iEnvVarName + << " environment variable to use Freestyle." << endl + << " Otherwise, the current directory will be used instead." << endl; + value = "."; + } + else { + value = getenv(iEnvVarName.c_str()); + } + return value; } -} // End of namepace Config +} // namespace Config } /* namespace Freestyle */ |