diff options
author | Ton Roosendaal <ton@blender.org> | 2006-07-02 14:36:26 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-07-02 14:36:26 +0400 |
commit | ae59f05c85156e562ec8edcf0e87484862a0a630 (patch) | |
tree | ba265eb4dfe917357e445b1594f7b6d8dfbbd64a /source | |
parent | 9f6f44938e89e7ec4f9f03f7fb839af0bc9f0bb2 (diff) |
Bugfix #4563
Wave Modifier defaulted to Y waves, even when both X and Y buttons were
disabled. That case isn't very useful, nevertheless... if buttons allows it
then it should just work!
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index fb872086700..150897fe1e3 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -1457,13 +1457,14 @@ static void waveModifier_deformVerts(ModifierData *md, Object *ob, void *derived float *co = vertexCos[i]; float x= co[0]-wmd->startx; float y= co[1]-wmd->starty; - float amplit; + float amplit= 0.0f; if(wmd->flag & WAV_X) { if(wmd->flag & WAV_Y) amplit= (float)sqrt( (x*x + y*y)); else amplit= x; } - else amplit= y; + else if(wmd->flag & WAV_Y) + amplit= y; /* this way it makes nice circles */ amplit-= (ctime-wmd->timeoffs)*wmd->speed; |