import Blender, math from Blender import * curframe = Blender.Get('curframe') ipo = Ipo.Get('ObIpo') icu = ipo[Ipo.OB_LOCZ] if icu != None and len(icu.bezierPoints) > 0: ipoval = icu[curframe] if ipoval > 1.0: ipoval = 1.0 if ipoval < 0.0: ipoval = 0.0 ob_mesh = Object.Get('Cube') modifs = ob_mesh.modifiers for mod in modifs: if mod.name == 'cast': cast = factor cast[Modifier.Settings.Ratio] = ipoval ob_mesh.makeDisplayList()