Module IpoCurve :: Class IpoCurve

Class IpoCurve

source code

The IpoCurve object

This object gives access to generic data from all Ipo curves objects in Blender.

Important Notes for Rotation Ipo Curves:

For the rotation Ipo curves, the y values for points are in units of 10 degrees. For example, 45.0 degrees is stored as 4.50 degrees. These are the same numbers you see in the Transform Properties pop-up menu ( NKey ) in the IPO Curve Editor window. Positive rotations are in a counter-clockwise direction, following the standard convention.

Instance Methods
float
__getitem__(time)
Returns the value of the curve at a particular time.
source code
 
__setitem__(time)
Sets the value (Vertex Y) of the curve at a particular time.
source code
None
setExtrapolation(extendmode)
Sets the extend mode of the curve (deprecated).
source code
string
getExtrapolation()
Gets the extend mode of the curve (deprecated).
source code
None
setInterpolation(interpolationtype)
Sets the interpolation type of the curve (deprecated).
source code
string
getInterpolation()
Gets the interpolation type of the curve (deprecated).
source code
None
append(point)
Adds a Bezier point to a IpoCurve.
source code
None
addBezier(coordlist)
Adds a Bezier point to a curve deprecated).
source code
None
delBezier(index)
Deletes a Bezier point from a curve.
source code
None
recalc()
Recomputes the curve after changes to control points.
source code
string
getName()
Returns the name of the Ipo curve (deprecated).
source code
list of BezTriples
getPoints()
Returns all the points of the IpoCurve (deprecated).
source code
float
evaluate(time)
Compute the value of the Ipo curve at a particular time (deprecated).
source code
Instance Variables
list of BezTriples. bezierPoints
The list of the curve's bezier points.
int driver
Status of the driver.
int driverChannel
Object channel used to drive the Ipo curve.
string driverExpression
Python expression used to drive the Ipo curve.
Blender Object or None driverObject
Object used to drive the Ipo curve.
int extend
The curve's extend mode.
int interpolation
The curve's interpolation mode.
string name
The IpoCurve data name.
bool sel
The selection state of this curve.
Method Details

__getitem__(time)
(Indexing operator)

source code 
Returns the value of the curve at a particular time.
Parameters:
  • time (float) - time (Vertex X) on the curve
Returns: float
value (Vertex Y) corresponding to the given time

__setitem__(time)
(Index assignment operator)

source code 
Sets the value (Vertex Y) of the curve at a particular time.
Parameters:
  • time (float) - time (Vertex X) on the curve

setExtrapolation(extendmode)

source code 
Sets the extend mode of the curve (deprecated). Note: new scripts should use the extend attribute instead.
Parameters:
  • extendmode (string) - the extend mode of the curve. Can be Constant, Extrapolation, Cyclic or Cyclic_extrapolation.
Returns: None
None

getExtrapolation()

source code 
Gets the extend mode of the curve (deprecated). Note: new scripts should use the extend attribute instead.
Returns: string
the extend mode of the curve. Can be Constant, Extrapolation, Cyclic or Cyclic_extrapolation.

setInterpolation(interpolationtype)

source code 
Sets the interpolation type of the curve (deprecated). Note: new scripts should use the interpolation attribute instead.
Parameters:
  • interpolationtype (string) - the interpolation type of the curve. Can be Constant, Bezier, or Linear.
Returns: None
None

getInterpolation()

source code 
Gets the interpolation type of the curve (deprecated). Note: new scripts should use the interpolation attribute instead.
Returns: string
the interpolation type of the curve. Can be Constant, Bezier, or Linear.

append(point)

source code 
Adds a Bezier point to a IpoCurve.
Parameters:
  • point (BezTriple or tuple of 2 floats) - Can either be a BezTriple, or the x and y coordinates of the Bezier knot point.
Returns: None
None

addBezier(coordlist)

source code 
Adds a Bezier point to a curve deprecated). Note: new scripts should use append instead.
Parameters:
  • coordlist (tuple of (at least) 2 floats) - the x and y coordinates of the new Bezier point.
Returns: None
None

delBezier(index)

source code 
Deletes a Bezier point from a curve.
Parameters:
  • index (integer) - the index of the Bezier point. Negative values index from the end of the list.
Returns: None
None

recalc()

source code 
Recomputes the curve after changes to control points.
Returns: None
None

getName()

source code 
Returns the name of the Ipo curve (deprecated). Note: new scripts should use the name attribute instead. The name can be:
  1. Camera Ipo: Lens, ClSta, ClEnd, Apert, FDist.
  2. Material Ipo: R, G, B, SpecR, SpecG, SpecB, MirR, MirG, MirB, Ref, Alpha, Emit, Amb, Spec, Hard, SpTra, Ior, Mode, HaSize, Translu, RayMir, FresMir, FresMirI, FresTra, FresTraI, TraGlow, OfsX, OfsY, OfsZ, SizeX, SizeY, SizeZ, texR, texG, texB, DefVar, Col, Nor, Var, Disp.
  3. Object Ipo: LocX, LocY, LocZ, dLocX, dLocY, dLocZ, RotX, RotY, RotZ, dRotX, dRotY, dRotZ, SizeX, SizeY, SizeZ, dSizeX, dSizeY, dSizeZ, Layer, Time, ColR, ColG, ColB, ColA, FStreng, FFall, Damping, RDamp, Perm.
  4. Lamp Ipo: Energ, R, G, B, Dist, SpoSi, SpoBl, Quad1, Quad2, HaInt.
  5. World Ipo: HorR, HorG, HorB, ZenR, ZenG, ZenB, Expos, Misi, MisDi, MisSta, MisHi, StaR, StaG, StaB, StarDi, StarSi, OfsX, OfsY, OfsZ, SizeX, SizeY, SizeZ, TexR, TexG, TexB, DefVar, Col, Nor, Var.
  1. World Ipo: HorR, HorG, HorB, ZenR, ZenG, ZenB, Expos, Misi, MisDi, MisSta, MisHi, StarR, StarB, StarG, StarDi, StarSi, OfsX, OfsY, OfsZ,i SizeX, SizeY, SizeZ, texR, texG, texB, DefVar, Col, Nor, Var.
  2. Texture Ipo: NSize, NDepth, NType, Turb, Vnw1, Vnw2, Vnw3, Vnw4, MinkMExp, DistM, ColT, iScale, DistA, MgType, MgH, Lacu, Oct, MgOff, MgGain, NBase1, NBase2.
  3. Curve Ipo: Speed.
  4. Action Ipo: LocX, LocY, LocZ, SizeX, SizeY, SizeZ, QuatX, QuatY, QuatZ, QuatW.
  5. Sequence Ipo: Fac.
  6. Constraint Ipo: Inf.
Returns: string
the name of the Ipo curve.

getPoints()

source code 
Returns all the points of the IpoCurve (deprecated). Note: new scripts should use the bezierPoints attribute instead.
Returns: list of BezTriples
the points of the Ipo curve.

evaluate(time)

source code 
Compute the value of the Ipo curve at a particular time (deprecated). Note: new scripts should use icu[time] instead.
Parameters:
  • time (float) - value along the X axis
Returns: float
the Y value of the curve at the given time

Instance Variable Details

driver

Status of the driver. 1= on, 0= object, 2= python expression.
Type:
int

driverChannel

Object channel used to drive the Ipo curve. Use module constants: IpoCurve.LOC_X, IpoCurve.LOC_Y, IpoCurve.LOC_Z, IpoCurve.ROT_X, IpoCurve.ROT_Y, IpoCurve.ROT_Z, IpoCurve.SIZE_X, IpoCurve.SIZE_Y, IpoCurve.SIZE_Z
Type:
int

driverExpression

Python expression used to drive the Ipo curve. [0 - 127 chars]
Type:
string

extend

The curve's extend mode. See ExtendTypes for values.

Note: Cyclic Ipo curves never reach the end value. If the first and last bezier points do not have the same y coordinate, the value of the curve when it "cycles" is that of the first point. If a user wants to get the value of the final curve point, read the final point from the curve:
             ipo = Blender.Object.Get('Cube').ipo
             icu = ipo['LocX']
             endtime,endvalue = icu.bezierPoints[-1].pt
Type:
int

interpolation

The curve's interpolation mode. See InterpTypes for values.
Type:
int