[Closed] scripted spline relax modifier. Possible?
I’ve written a spline relax script. It does sort of what the relax modifier does to mesh, but it works on splines. I’ve never written a scripted modifier before and was wondering if it would actually be possible to turn this script into a modifier. Can anyone point me in the right direction as to where to head next if it is indeed possible? Here’s the script as it is right now. Feel free to download and use it for anything. Also, any feedback as to other features that you might think would be useful when relaxing a spline, or better ways that it might have been written.
Thanks all,
Cg.
It looks like you can write stuff for splines, but you’d have to jump in and test your script.
From “Scripted SimpleMod Plug-ins” in the help:
[color=blue]on[/color] map i p [color=blue]do[/color]
[left](
[/left]
[left]p.z += amount * sin((p.x * 22.5/extent.x) * (p.y * 22.5/extent.y))
[/left]
[left]p
[/left]
[left])
[/left]This event handler is called once for every point in the object (or current point selection in the object) being modified. These points may be mesh vertices, spline vertices, NURBS CVs, and so on. The [b][b]<index>[/b][/b] argument gives the number of the point, but this index may not correspond to a vertex number in a mesh or a spline.