AARRGGHH!!!
Just found out that it works only as long as the object the camera is tracked to isn’t moving. Camerarotation won’t follow if it moves :eek:. Maybe i have to update the object the camera is tracked to for every new frame, but i have no idea. I’m worrying for several hours by now. Maybe someone has a hint for me?? Here’s what i have done so far:
import Blender as B
scn = B.Scene.getCurrent()
obj = B.Object.GetSelected()
cam = obj[0]
context = scn.getRenderingContext()
ipo = B.Ipo.New('Object','CamIpo')
locx = ipo.addCurve("LocX")
locy = ipo.addCurve("LocY")
locz = ipo.addCurve("LocZ")
rotx = ipo.addCurve("RotX")
roty = ipo.addCurve("RotY")
rotz = ipo.addCurve("RotZ")
for frame in range(1,context.endFrame()):
context.currentFrame(frame)
print cam.matrixWorld.toEuler()
#location = cam.matrixWorld.translationPart()
#locx.addBezier((frame,location[0]))
#locy.addBezier((frame,location[1]))
#locz.addBezier((frame,location[2]))
#rotation = cam.matrixWorld.rotationPart().toEuler()
#rotx.addBezier((frame,rotation[0]/10.0))
#roty.addBezier((frame,rotation[1]/10.0))
#rotz.addBezier((frame,rotation[2]/10.0))
#cam.setIpo(ipo)
thanx in advance,
knekke