diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-08-18 23:54:21 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-08-18 23:54:21 +0400 |
commit | 12425588f2d33174e4a78873075b185ea51ebc3d (patch) | |
tree | 2a5c4a297d0461a026e42d5788d2344c8a6354e7 /source/blender/blenkernel/intern/CCGSubSurf.c | |
parent | e30ed91b9011b6eb5fae2932c002f83936c31d9d (diff) |
Fix simple subsurf on wire edges
Subsurf on wire edges gave smooth results even if set to simple
subdiv. Added a field to the CCG meshIFC to flag simple subdivision,
then when syncing vertices simply skip moving vertices if in
simple-subdiv mode.
This change affects two places, the level-1 build in sync and the
subdivision up to other levels.
Fixes bug [#32268] Simple Subsurf Modifier gives unexpected results on
edges without faces
projects.blender.org/tracker/index.php?func=detail&aid=32268&group_id=9&atid=498
Diffstat (limited to 'source/blender/blenkernel/intern/CCGSubSurf.c')
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c index c456840637a..387d4775ad4 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.c +++ b/source/blender/blenkernel/intern/CCGSubSurf.c @@ -1798,7 +1798,7 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss, if (seamEdges < 2 || seamEdges != v->numEdges) seam = 0; - if (!v->numEdges) { + if (!v->numEdges || ss->meshIFC.simpleSubdiv) { VertDataCopy(nCo, co, ss); } else if (_vert_isBoundary(v)) { @@ -2246,7 +2246,7 @@ static void ccgSubSurf__sync(CCGSubSurf *ss) if (seamEdges < 2 || seamEdges != v->numEdges) seam = 0; - if (!v->numEdges) { + if (!v->numEdges || ss->meshIFC.simpleSubdiv) { VertDataCopy(nCo, co, ss); } else if (_vert_isBoundary(v)) { @@ -2827,6 +2827,11 @@ int ccgSubSurf_getGridLevelSize(const CCGSubSurf *ss, int level) } } +int ccgSubSurf_getSimpleSubdiv(const CCGSubSurf *ss) +{ + return ss->meshIFC.simpleSubdiv; +} + /* Vert accessors */ CCGVertHDL ccgSubSurf_getVertVertHandle(CCGVert *v) |