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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-02-23 07:05:38 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-02-23 07:05:38 +0400
commitec34bf3c6796b57fa2316f694f4a3c9137e3f6ca (patch)
tree50e08a4394440050941da2fb7a7d21c2bac437dd /source/blender/freestyle/intern
parent68b0a8e39026ea2b391751406dc4bdb0a4ed958c (diff)
Fix for texture images left unreleased.
Diffstat (limited to 'source/blender/freestyle/intern')
-rw-r--r--source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
index 73651e7d672..a083c6b2f1b 100644
--- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
+++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
@@ -204,22 +204,22 @@ ThicknessVariationPatternShader::ThicknessVariationPatternShader(const string pa
_stretch = stretch;
_minThickness = iMinThickness;
_maxThickness = iMaxThickness;
- ImBuf *image = NULL; //soc
+ ImBuf *image = NULL;
vector<string> pathnames;
StringUtils::getPathName(TextureManager::Options::getPatternsPath(), pattern_name, pathnames);
for (vector<string>::const_iterator j = pathnames.begin(); j != pathnames.end(); ++j) {
ifstream ifs(j->c_str());
if (ifs.is_open()) {
- //soc image.load(j->c_str());
/* OCIO_TODO: support different input color space */
image = IMB_loadiffname(j->c_str(), 0, NULL);
break;
}
}
- if (image == NULL) //soc
+ if (image == NULL)
cerr << "Error: cannot find pattern \"" << pattern_name << "\" - check the path in the Options" << endl;
else
convert(image, &_aThickness, _size);
+ IMB_freeImBuf(image);
}
@@ -336,7 +336,7 @@ int IncreasingColorShader::shade(Stroke& stroke) const
ColorVariationPatternShader::ColorVariationPatternShader(const string pattern_name, bool stretch) : StrokeShader()
{
_stretch = stretch;
- ImBuf *image = NULL; //soc
+ ImBuf *image = NULL;
vector<string> pathnames;
StringUtils::getPathName(TextureManager::Options::getPatternsPath(), pattern_name, pathnames);
for (vector<string>::const_iterator j = pathnames.begin(); j != pathnames.end(); ++j) {
@@ -347,10 +347,11 @@ ColorVariationPatternShader::ColorVariationPatternShader(const string pattern_na
break;
}
}
- if (image == NULL) //soc
+ if (image == NULL)
cerr << "Error: cannot find pattern \"" << pattern_name << "\" - check the path in the Options" << endl;
else
convert(image, &_aVariation, _size);
+ IMB_freeImBuf(image);
}
int ColorVariationPatternShader::shade(Stroke& stroke) const