Module IpoCurve :: Class IpoCurve
[frames | no frames]

Class IpoCurve


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.
Method Summary
float __getitem__(time)
Returns the value of the curve at a particular time.
  __setitem__(time)
Sets the value (Vertex Y) of the curve at a particular time.
None addBezier(coordlist)
Adds a Bezier point to a curve deprecated).
None append(point)
Adds a Bezier point to a IpoCurve.
None delBezier(index)
Deletes a Bezier point from a curve.
float evaluate(time)
Compute the value of the Ipo curve at a particular time (deprecated).
string getExtrapolation()
Gets the extend mode of the curve (deprecated).
string getInterpolation()
Gets the interpolation type of the curve (deprecated).
string getName()
Returns the name of the Ipo curve (deprecated).
list of BezTriples getPoints()
Returns all the points of the IpoCurve (deprecated).
None recalc()
Recomputes the curve after changes to control points.
None setExtrapolation(extendmode)
Sets the extend mode of the curve (deprecated).
None setInterpolation(interpolationtype)
Sets the interpolation type of the curve (deprecated).

Instance Variable Summary
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)

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

__setitem__(time)
(Index assignment operator)

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

addBezier(coordlist)

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

append(point)

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

delBezier(index)

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

evaluate(time)

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

getExtrapolation()

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

getInterpolation()

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

getName()

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:
the name of the Ipo curve.
           (type=string)

getPoints()

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

recalc()

Recomputes the curve after changes to control points.
Returns:
None
           (type=None)

setExtrapolation(extendmode)

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

setInterpolation(interpolationtype)

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

Instance Variable Details

bezierPoints

The list of the curve's bezier points.
Type:
list of BezTriples.

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

driverObject

Object used to drive the Ipo curve.
Type:
Blender Object or None

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

name

The IpoCurve data name.
Type:
string

sel

The selection state of this curve.
Type:
bool

Generated by Epydoc 2.1 on Sun Feb 11 13:30:19 2007 http://epydoc.sf.net