hello,
since several days i’ve been building a nearly realistic moving tank-track with several functions to animate it.
(it is based on the tank track tutorial found via the blender website.)
but now i have some trouble with a python script, i needed to program, to copy the values of the control points of one “master”-curve to 73 other curves. i did this, because i do not want to modify and key all these 73 curves manually to deform the whole track.
the main code is the following:
####################################
# MAIN DOING #
####################################
dst_obj = Blender.link
src_curve = Curve.Get('Kette_Ctrl.L')
dst_curve = dst_obj.getData()
pts = src_curve.getNumPoints()
for p in range(0, pts):
src_pt = src_curve.getControlPoint(0, p)
dst_curve.setControlPoint(0, p, src_pt)
dst_curve.update()
this code is linked to the 73 curve-objects by each 2 object script links, once of type “FrameChange” and the other of type “Redraw”.
When I now activate the Script links and do some editing, frame changing, or - much more “evil” - some anim-preview with ALT-AKEY, logically the scripts are called again and again and again and…
BUT: now Blender turns into a memory-eating monster!!!
it needs round about 10 to 15 seconds to eat the rest oft 800 MB of my 1 GB of RAM. and if i let it continue, some seconds later my swap-file is full with 1,85 GB of data-garbage!!!
and the baddest thing is, how long ever i wait, the memory is not been freed!!!
(same problem comes up even on rendering the animation, but it is not quite as bad!)
now i think of at least 2 alternatives:
- there is a bug in Blender with the Scripting module - or
- i’ve made a mistake and perhaps i have to free memory myself. but i do not know how to do in python
now i ask for help!!!
perhaps there is someone here, who is able to give me advice!
Thanks in advance!
FastEddy - Germany
perhaps i should tell my config:
im using Blender 2.37a on AMD Athlon 64 3500+ with 1 GB RAM and Windows XP (SP1) - sorry, i’d like to use Linux, but then my video-editor would not be usable anymore! :-?
the scene-file (please, do not copy or distribute) can be found as zip under:
http://fasteddy.fa.ohost.de/download/Kettenlaufwerk_komplett_PAK.zip