Module Ipo
source code
The Blender.Ipo submodule
New:
-
Ipo updates to both the program and Bpython access.
-
access to Blender's new Ipo driver capabilities.
-
Ipo now supports the mapping operator [] to access IpoCurves
This module provides access to the Ipo Data in Blender. An Ipo is
composed of several IpoCurves, and an IpoCurve is composed of several
BezTriples.
Example:
from Blender import Ipo
ipo = Ipo.Get('ObIpo') # retrieves an Ipo object
ipo.name = 'ipo1' # change the Ipo's name
icu = ipo[Ipo.OB_LOCX] # request X Location Ipo curve
if icu != None and len(icu.bezierPoints) > 0: # if curve exists and has BezTriple points
val = icu[2.5] # get the curve's value at time 2.5
ipo[Ipo.OB_LOCX] = None # delete the Ipo curve
Each type of Ipo has different types Ipocurves. With the exception of
Shape Key Ipos, constants are used to specify all Ipocurves. There are
two ways to tell which Ipo curves go with which Ipo type:
-
all constants start with a two-character identifier for their Ipo
type; for example, "OB_LOCX" is the LocX curve for an
Object Ipo
-
each Ipo now has a read-only attribute Ipo.curveConsts, which returns the valid Ipo curve
types for that specific Ipo
The valid IpoCurve constants are:
-
Material Ipo: MA_R, MA_G, MA_B, MA_SPECR, MA_SPECG, MA_SPECB,
MA_MIRR, MA_MIRG, MA_MIRB, MA_REF, MA_ALPHA, MA_EMIT, MA_AMB,
MA_SPEC, MA_HARD, MA_SPTRA, MA_IOR, MA_MODE, MA_HASIZE, MA_TRANSLU,
MA_RAYMIR, MA_FRESMIR, MA_FRESMIRI, MA_FRESTRA, MA_FRESTRAI,
MA_TRAGLOW, MA_OFSX, MA_OFSY, MA_OFSZ, MA_SIZEX, MA_SIZEY, MA_SIZEZ,
MA_TEXR, MA_TEXG, MA_TEXB, MA_DEFVAR, MA_COL, MA_NOR, MA_VAR, MA_DISP
-
Lamp Ipo: LA_ENERG, LA_R, LA_G, LA_B, LA_DIST, LA_SPOSI, LA_SPOBL,
LA_QUAD1, LA_QUAD2, LA_HAINT, LA_OFSX, LA_OFSY, LA_OFSZ, LA_SIZEX,
LA_SIZEY, LA_SIZEZ, LA_TEXR, LA_TEXG, LA_TEXB, LA_DEFVAR, LA_COL
-
World Ipo: WO_HORR, WO_HORG, WO_HORB, WO_ZENR, WO_ZENG, WO_ZENB,
WO_EXPOS, WO_MISI, WO_MISDI, WO_MISSTA, WO_MISHI, WO_STARR, WO_STARB,
WO_STARG, WO_STARDI, WO_STARSI, WO_OFSX, WO_OFSY, WO_OFSZ, WO_SIZEX,
WO_SIZEY, WO_SIZEZ, WO_TEXR, WO_TEXG, WO_TEXB, WO_DEFVAR, WO_COL,
WO_NOR, WO_VAR
-
Camera Ipo: CA_LENS, CA_CLSTA, CA_CLEND, CA_APERT, CA_FDIST
-
Object Ipo: OB_LOCX, OB_LOCY, OB_LOCZ, OB_DLOCX, OB_DLOCY, OB_DLOCZ,
OB_ROTX, OB_ROTY, OB_ROTZ, OB_DROTX, OB_DROTY, OB_DROTZ, OB_SCALEX,
OB_SCALEY, OB_SCALEZ, OB_DSCALEX, OB_DSCALEY, OB_DSCALEZ, OB_LAYER,
OB_TIME, OB_COLR, OB_COLG, OB_COLB, OB_COLA, OB_FSTRENG, OB_FFALL,
OB_RDAMP, OB_DAMPING, OB_PERM
-
Curve Ipo: CU_SPEED
-
Constraint Ipo: CO_INF
-
Texture Ipo: TE_NSIZE, TE_NDEPTH, TE_NTYPE, TE_TURB, TE_VNW1,
TE_VNW2, TE_VNW3, TE_VNW4, TE_MINKMEXP, TE_DISTM, TE_COLT, TE_ISCALE,
TE_DISTA, TE_MGTYPE, TE_MGH, TE_LACU, TE_OCT, TE_MGOFF, TE_MGGAIN,
TE_NBASE1, TE_NBASE2, TE_COLR, TE_COLG, TE_COLB, TE_BRIGHT,
TE_CONTRAS
-
Pose/Action Ipo: PO_LOCX, PO_LOCY, PO_LOCZ, PO_SCALEX, PO_SCALEY,
PO_SCALEZ, PO_QUATW, PO_QUATX, PO_QUATY, PO_QUATZ
-
Sequence Ipo: SQ_FAC
Shape Key Ipos are handled differently from other Ipos. The user can
rename the curves, so string are used to access them instead of
constants. The Ipo.curveConsts attribute for Shape Key Ipos returns a
list of all defined key names.
|
Ipo
This object gives access to Ipo data from all objects in Blender.
|
Blender Ipo
|
|
Blender Ipo or a list of Blender Ipos
|
|
Creates a new Ipo.
- Parameters:
type (string) - The Ipo's blocktype. Depends on the object the Ipo will be linked
to. Currently supported types are Object, Camera, World,
Material, Texture, Lamp, Action, Constraint, Sequence, Curve,
Key.
name (string) - The name for this Ipo.
- Returns: Blender Ipo
- The created Ipo.
|
Get the Ipo from Blender.
- Parameters:
name (string) - The name of the requested Ipo, or nothing.
- Returns: Blender Ipo or a list of Blender Ipos
- It depends on the 'name' parameter:
-
(name): The Ipo with the given name;
-
(): A list with all Ipos in the current scene.
|