diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-04 15:13:41 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-04 15:13:41 +0400 |
commit | 317908a330184799eecfe34ed47648d5323b43de (patch) | |
tree | be5b0b8d628931a98eadff745b420bd25028bb80 /source/blender/modifiers/intern/MOD_screw.c | |
parent | caa1acb6b1d6b908e34be31c4b9bd026066b820f (diff) |
Fix #28423: Screw-modifier crash in cunjunction with subsurf modifier
Problems was caused by angle=2*pi and steps=2 in screw modifier.
Such configuration produced duplicated geometry to close object
and it was confusing for subsurf cache.
Restrict steps=2 for screw modifier now, so now 3<=steps<=512.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_screw.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_screw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index c5fdf465a0a..486c98f82a0 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -275,7 +275,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, if (fabsf(screw_ofs) <= (FLT_EPSILON*100.0f) && fabsf(fabsf(angle) - ((float)M_PI * 2.0f)) <= (FLT_EPSILON*100.0f)) { close= 1; step_tot--; - if(step_tot < 2) step_tot= 2; + if(step_tot < 3) step_tot= 3; maxVerts = totvert * step_tot; /* -1 because we're joining back up */ maxEdges = (totvert * step_tot) + /* these are the edges between new verts */ @@ -286,7 +286,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } else { close= 0; - if(step_tot < 2) step_tot= 2; + if(step_tot < 3) step_tot= 3; maxVerts = totvert * step_tot; /* -1 because we're joining back up */ maxEdges = (totvert * (step_tot-1)) + /* these are the edges between new verts */ |