Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-05-26 23:52:55 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-05-26 23:52:55 +0400
commit373d42dbeaef014ce6d8c9d337242966d7ca8e5f (patch)
treebf150d1c812ae8de8702580fd49ccfa9fe88f59f /source/blender/freestyle/intern/system/StringUtils.cpp
parentfc8cd192a3a22322f6127345dc14f8463b35ee1f (diff)
soc-2008-mxcurioni: PythonInterpreter works, using Blender's Python functions. The drawing still does not produce anything because the SWIG module wrapper is missing
Diffstat (limited to 'source/blender/freestyle/intern/system/StringUtils.cpp')
-rwxr-xr-xsource/blender/freestyle/intern/system/StringUtils.cpp34
1 files changed, 19 insertions, 15 deletions
diff --git a/source/blender/freestyle/intern/system/StringUtils.cpp b/source/blender/freestyle/intern/system/StringUtils.cpp
index bbdbef10a10..58798daf42a 100755
--- a/source/blender/freestyle/intern/system/StringUtils.cpp
+++ b/source/blender/freestyle/intern/system/StringUtils.cpp
@@ -27,25 +27,29 @@ namespace StringUtils {
void getPathName(const string& path, const string& base, vector<string>& pathnames) {
string dir;
+ string res;
+ char cleaned[FILE_MAX];
unsigned size = path.size();
+
pathnames.push_back(base);
- for (unsigned pos = 0, sep = path.find(Config::PATH_SEP, pos);
- pos < size;
- pos = sep + 1, sep = path.find(Config::PATH_SEP, pos)) {
- if (sep == (unsigned)string::npos)
- sep = size;
- dir = path.substr(pos, sep - pos);
-//soc QFileInfo fi(dir.c_str());
-//soc string res = (const char*)fi.absoluteFilePath().toAscii();
- char cleaned[FILE_MAX];
- BLI_strncpy(cleaned, dir.c_str(), FILE_MAX);
- BLI_cleanup_file(NULL, cleaned);
- string res = toAscii( string(cleaned) );
+ for ( unsigned pos = 0, sep = path.find(Config::PATH_SEP, pos);
+ pos < size;
+ pos = sep + 1, sep = path.find(Config::PATH_SEP, pos)) {
+
+ if (sep == (unsigned)string::npos)
+ sep = size;
+
+ dir = path.substr(pos, sep - pos);
+
+ BLI_strncpy(cleaned, dir.c_str(), FILE_MAX);
+ BLI_cleanup_file(NULL, cleaned);
+ res = toAscii( string(cleaned) );
- if (!base.empty())
- res += Config::DIR_SEP + base;
- pathnames.push_back(res);
+ if (!base.empty())
+ res += Config::DIR_SEP + base;
+
+ pathnames.push_back(res);
}
}