| Module: Ipo | ./Ipo.py | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The Blender Ipo module This module provides access to Ipo objects in Blender. An Ipo object is a datablock of IpoCurves which control properties of an object in time. Note that IpoCurves assigned to rotation values (which must be specified in radians) appear scaled in the IpoWindow (which is in fact true, due to the fact that conversion to an internal unit of 10.0 angles happens). Example:
from Blender import Ipo, Object
ipo = Ipo.New('Object', 'ObIpo') # Create object ipo with name 'ObIpo'
curve = ipo.addCurve('LocY') # add IpoCurve for LocY
curve.setInterpolation('Bezier') # set interpolation type
curve.setExtrapolation('CyclicLinear') # set extrapolation type
curve.addBezier((0.0, 0.0)) # add automatic handle bezier point
curve.addBezier((20.0, 5.0), 'Free', (10.0, 4.0)) # specify left handle, right auto handle
curve.addBezier((30.0, 1.0), 'Vect') # automatic split handle
curve.addBezier((100.0, 1.0)) # auto handle
curve.update() # recalculate curve handles
curve.eval(35.0) # evaluate curve at 35.0
ob = Object.get('Plane')
ob.setIpo(ipo) # assign ipo to object
|