Wave creator

Wave Creator ~ version 0.1

This script is still in an alpha stage, but I already wanted to share it with the community. It will create a mesh that can be used as for example a flag. It updates at every frame change, so you can use it for animations.
I’m still working on additions so that it can also be used to create an animation of the opening of a stage curtain.

Before anybody asks: python is indeed not necessary for this, and these effects can be created in blender without it. I’m just writing this script to learn python.

You can find the python script here.
The general page is located over here.

Currently the main problem is the slow down of the script.
When you start the script for the first time and hit ALT-A, everything runs smooth.
However if you hit ALT-A after changing several values, blender slows down, or comes to a complete standstill.
Using the reset button doesn’t help. If anybody knows a solution, or can point where the problem is exactly located, please tell me.

Other comments, suggestions and bugreports are welcome as well.

very cool but as you said to slow. To slow to even test, and this is a fast computer …

The strange thing is that when you don’t change any values at all it is fast.
So probably there is a memory leak. I just can’t find it. If anybody does, please tell me.

I found the mistake:
On every change of a value there was a new scriptlink added to the mesh. The fix was easy: just place some lines of code outside the CreateWave function.

I replaced the old version with the fixed one, so the link in the first post is still valid.

NOTE: The new softbodies do a much better job at what this script can do. So probably this script won’t be updated anymore. On the other hand I’ve created the script as a learning process for myself, so perhaps some additions will still be made. We’ll see what the future brings…

? Why do the softbodies matter ? Your script would work even better with the softbodies, since softboddies is really looking like jello right now…

I will test it again tonight to see…

The softbodies have gotten a lot more advanced recently, and are capable of cloth and clothing simulation with the right settings, so this script might not be needed, but ifr it is to improve python skills, then keep working on it, and add some new ideas. I haven’t tried python, but I want to spend time learning it, if I ever have the chance (or the time to).