Logo Search packages:      
Sourcecode: blender version File versions  Download package

Ipo::Ipo Class Reference

List of all members.

Detailed Description

The Ipo object
This object gives access to Ipo data from all objects in Blender.
@Note: Blender Materials, Lamps and Worlds have I{texture channels} which
allow the user to assign textures to them.  The Blender Ipo Window allows
the user to access the IpoCurves for these channels by specifying a number
between 0 and 9 (the number appears next to the Ipo type in the window
header).  Prior to Version 2.42, the BPy API did not allow users to access
these texture channels in a predictable manner.  A new attribute named
L{channel} was added to the API in Version 2.42 to correct this problem.

The current channel setting has an effect on the operators B{[]}, B{len()} 
and others.  For example, suppose a Material has three IpoCurves 
(R, G, and B), and two texture channels (numbered 0 and 1), and furthermore
channel 0 has one Ipocurve (Col).  The IpoCurve Col can only be
"seen" through the API when B{ipo.channel} is 0.  Setting B{ipo.channel} to
1 will cause this curve to be ignored by B{len(ipo)}::

      from Blender import Ipo

      ipo = Ipo.Get('MatIpo')
      for channel in xrange(2):
                  ipo.channel = channel
                  print 'channel is',channel
                  print ' len is',len(ipo)
                  names = dict([(x[1],x[0]) for x in ipo.curveConsts.items()])
                  for curve in [Ipo.MA_R,Ipo.MA_COL]:
                              print ' ',names[curve],'is',curve in ipo

will output::
      channel is 0
      len is 4
            MA_R is True
            MA_COL is True
      channel is 1
      len is 3
            MA_R is True
            MA_COL is False

@ivar curves: Ipo curves currently defined for the Ipo.
@type curves: list of Ipocurves.
@ivar curveConsts: The valid Ipo curves for this Ipo.  These can be used
by the [] mapping operator.  The value 
depends on the Ipo curve type.  If the Ipo is any type other than a Key or
Shape Ipo, this attribute returns a set of constants that can be
used to specify a particular curve.  For Key or Shape Ipos, the attribute
returns a list of all defined keys by name.  
@type curveConsts: constant or list of strings. Read-only.
@ivar channel: the current texture channel for Blender object which support
textures (materials, lamps and worlds).  Returns None if the Ipo does
not support texture channels. Value must be in the range [0,9].
@type channel: int or None

Definition at line 94 of file Ipo.py.

Public Member Functions

def __contains__
def __getitem__
def __iter__
def __len__
def addCurve
def delCurve
def EvaluateCurveOn
def getBeztriple
def getBlocktype
def getCurve
def getCurveBP
def getCurveCurval
def getCurves
def getName
def getNcurves
def getRctf
def setBeztriple
def setBlocktype
def setName
def setRctf

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index