Fix for [#35352] Freestyle + Geometry Spatial Noise freezes on render.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Thu, 16 May 2013 00:20:57 +0000 (00:20 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Thu, 16 May 2013 00:20:57 +0000 (00:20 +0000)
SpatialNoiseShader, as well as SmoothingShader were not updating stroke length after
geometry modification, causing an infinite loop in Stroke::Resample(int iNPoints) due to
incorrect length-based resampling of stroke vertices.

source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp

index 2215bd9df02fbc33277aa31f946e9087947c920a..d30a75d9e146b0f30b9538aca4dece38a029895a 100644 (file)
@@ -158,6 +158,8 @@ int SpatialNoiseShader::shade(Stroke &ioStroke) const
                ++v;
        }
 
+       ioStroke.UpdateLength();
+
        return 0;
 }
 
@@ -342,6 +344,7 @@ void Smoother::copyVertices()
                (v)->setPoint(p[0], p[1]);
                ++i;
        }
+       _stroke->UpdateLength();
 }
 
 #if 0 // FIXME