Script problems

I’ve been trying to get this python script to work:…ht=array+count
I tried running it and got an error. Then I actually looked at the syntax and changed the name of the IPO curve for my empty to ‘Empty’ and the script appears to work. The array in question changes size to 13 instead of what it was at. Though it doesn’t animate with the empty. It just stays at 13. Any ideas?

Any ideas?

I’m trying to animate the ‘count’ variable of an array modifier to make a vine “grow”.

the link does not work.
what script are you working on?

Sorry about that. Here’s the code:

import Blender, math
from Blender import *
curframe = Blender.Get(‘curframe’)
ipo = Ipo.Get(‘Empty’)
icu = ipo[Ipo.OB_LOCX]
if icu != None and len(icu.bezierPoints) > 0:
ipoval = icu[curframe]
if ipoval > 25.0: ipoval = 25.0
if ipoval < 2.0: ipoval = 2.0

ob_mesh = Object.Get(‘Cube’)
modifs = ob_mesh.modifiers
for mod in modifs:
if == ‘Array’: decim = mod
decim[Modifier.Settings.COUNT] = int(ipoval)

Is there perhaps a better way to animate the growth of a vine along a path? In the past I have tried making a shape key for a cylinder that has a lot of loop cuts to extend it along the X-axis, so it just expands along a curve, but the result looks a little off.

One pretty easy way to achieve this is to model the vine using curves. Basically you need the curve to represent overall shape of the curve (base curve), a curve to define its profile (BevOb) and a curve to taper it. Tapering allows you to determine the amount which profile affects to base curve at given location of the curve.

To animate a vine grow, all you need to do is to just set up a hook (or a couple of hooks) to the taper curve and animate location of those to make it look like the vine is growing. I believe this is the technique they using in the production of Elephants Dream.

If you didn’t get the brief explanation above, check out the wiki documentation about curves. I believe it’s all explained there.

The technique BeBraw is talking about is a good one and there is even a video tutorial about it by Pablo Lizardo. Check it out at BlenderNation.

Thank you guys very much! That works a lot better than the way I was trying to do it.