diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-07-19 10:38:56 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-08-12 05:10:35 +0400 |
commit | c38e80d6322b942fd2a893f4f294a919ed6e6b99 (patch) | |
tree | 67470e7670d5975085a5a211a3c5aab9cef4aa51 /source/blender/freestyle/intern/stroke/StrokeRep.cpp | |
parent | a2a2d4679ae28dbc9f6bed1c8663cea9ccb71176 (diff) |
WIP commit just for a record of a working snapshot of code revisions for node-based textured strokes.
Diffstat (limited to 'source/blender/freestyle/intern/stroke/StrokeRep.cpp')
-rw-r--r-- | source/blender/freestyle/intern/stroke/StrokeRep.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp index 04087693e3b..bdc21913f14 100644 --- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp +++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp @@ -516,6 +516,7 @@ void Strip::setVertexColor (const vector<StrokeVertex *>& iStrokeVertices) void Strip::computeTexCoord (const vector<StrokeVertex *>& iStrokeVertices, float texStep) { + cout << "Strip::computeTexCoord texStep " << texStep << endl; vector<StrokeVertex *>::const_iterator v, vend; StrokeVertex *sv; int i = 0; @@ -705,6 +706,8 @@ StrokeRep::StrokeRep() _stroke = 0; _strokeType = Stroke::OPAQUE_MEDIUM; _lineStyle = NULL; + _useShadingNodes = false; + _hasTex = false; _textureStep = 1.0; for (int a = 0; a < MAX_MTEX; a++) { _mtex[a] = NULL; @@ -726,6 +729,8 @@ StrokeRep::StrokeRep(Stroke *iStroke) _stroke = iStroke; _strokeType = iStroke->getMediumType(); _lineStyle = iStroke->getLineStyle(); + _useShadingNodes = iStroke->useShadingNodes(); + _hasTex = iStroke->hasTex(); _textureId = iStroke->getTextureId(); _textureStep = iStroke->getTextureStep(); for (int a = 0; a < MAX_MTEX; a++) { @@ -760,6 +765,8 @@ StrokeRep::StrokeRep(const StrokeRep& iBrother) _textureId = iBrother._textureId; _textureStep = iBrother._textureStep; _lineStyle = iBrother._lineStyle; + _useShadingNodes = iBrother._useShadingNodes; + _hasTex = iBrother._hasTex; for (int a = 0; a < MAX_MTEX; a++) { if (iBrother._mtex[a]) { _mtex[a] = iBrother._mtex[a]; @@ -811,7 +818,7 @@ void StrokeRep::create() end = true; } if ((!strip.empty()) && (strip.size() > 1)) { - _strips.push_back(new Strip(strip, _stroke->hasTex(), first, end, _textureStep)); + _strips.push_back(new Strip(strip, _hasTex, first, end, _textureStep)); strip.clear(); } first = false; |