from Blender import Get, Scene, Noise, Object from Blender.Mathutils import Vector # jitter speed j = 0.15 # pos jitter pj = 0.005 # rot jitter rj = 0.025 # min jitter - see the "jittering" value printed to console #minj = 0.4 # max jitter #maxj = 10.0 cam = Scene.GetCurrent().getCurrentCamera() plane = Object.Get('airplane.005') pvec = Vector(cam.getLocation()) - Vector(plane.getLocation()) pdist = pvec.length time = Get('curtime') #psi = max((j*time)/pdist, minj) #psi = min(psi, maxj) psi = (j * time) / pdist ps = (psi, psi, psi) print "jittering %.3f" % psi rv = Noise.vTurbulence(ps, 3, 0, Noise.NoiseTypes.NEWPERLIN) cam.dloc = (pj * rv[0], pj * rv[1], pj * rv[2]) cam.drot = (rj * rv[0], rj * rv[1], rj * rv[2]