Exporting animation

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
MangoFusion
Posts: 0
Joined: Wed Nov 19, 2003 4:10 pm

Exporting animation

Post by MangoFusion »

Hi there,

I have managed to export all bone animation more or less perfectly with the Action and Ipo interfaces within the blender python api.
However, the format i am exporting to supports more than bone animation, and i cannot determine a way to export this extra data effectively from blender.

From what i can tell, only Blender Action's translate to the concept of "sequences", as in, you have sequence "Foo" with frames A-B - which presents a problem; All i can export in this manner is bone animation.

I have noticed that you can create individual ipo's for Materials, Meshes, etc, but these seem to be for the entire duration of the scene, and of course, you cannot plonk these ipo's into actions.

Does anyone have any suggestions on how i can export other animated properties (visibility, color, etc) from blender into specific "sequences"?

kitsu
Posts: 0
Joined: Sun Jun 06, 2004 8:08 am

Post by kitsu »

Would the Ipo evaluate functions help?

from Blender import *

ob = Ipo.Get('ipo')
curve = ob.getCurve('Alpha')
Alpha_at_frame_30 = curve.Evaluate(30)

There is also Ipo.EvaluateOn(time,curvepos). There's also a list of IpoCurve names under Ipo > getCurve in the python docs.

Post Reply