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>2014-05-26 05:53:42 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-05-26 05:54:25 +0400
commitfce731a1753a9aabec6327e724b53d9939aa3286 (patch)
tree142ea9afefdc391352aba214f6145edea5dd2625 /source/blender/freestyle
parent6b7bee6cd7f904b55090b0fb39facb97d3c2321e (diff)
Fix for thinning strokes at intersections between visible and background hidden lines.
This commit is intended to fully fix the problem described in https://developer.blender.org/T36425#19 (see also the previous commit rB08528f577dcb). Addition of a small offset (to avoid singularity in stroke rendering due to overlapping vertices) was not performed for all overlapping vertices. Removed the StrokeCleaner and related helper functions which were added as a temporary workaround in rB2a5b6d9c8f16.
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r--source/blender/freestyle/intern/stroke/Operators.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp
index 2f05413fcbe..427994f80f1 100644
--- a/source/blender/freestyle/intern/stroke/Operators.cpp
+++ b/source/blender/freestyle/intern/stroke/Operators.cpp
@@ -1147,17 +1147,16 @@ static Stroke *createStroke(Interface1D& inter)
StrokeVertex *sv;
std::vector<StrokeVertex *>::iterator it = overlapping_vertices.begin();
if (!reverse) {
- for (int n = 1; n < nvert; n++) {
+ for (int n = 0; n < nvert; n++) {
sv = (*it);
- sv->setPoint(sv->getPoint() + offset * n);
+ sv->setPoint(sv->getPoint() + offset * (n + 1));
++it;
}
}
else {
- int last = nvert - 1;
- for (int n = 0; n < last; n++) {
+ for (int n = 0; n < nvert; n++) {
sv = (*it);
- sv->setPoint(sv->getPoint() + offset * (last - n));
+ sv->setPoint(sv->getPoint() + offset * (nvert - n));
++it;
}
}