2004-06-02 12:43:27 +00:00
|
|
|
# $Id$
|
|
|
|
# Documentation for KX_IpoActuator
|
|
|
|
from SCA_IActuator import *
|
|
|
|
|
|
|
|
class KX_IpoActuator(SCA_IActuator):
|
|
|
|
"""
|
|
|
|
IPO actuator activates an animation.
|
2009-03-26 01:42:01 +00:00
|
|
|
|
|
|
|
@ivar startFrame: Start frame.
|
|
|
|
@type startFrame: float
|
|
|
|
@ivar endFrame: End frame.
|
|
|
|
@type endFrame: float
|
|
|
|
@ivar propName: Use this property to define the Ipo position
|
|
|
|
@type propName: string
|
|
|
|
@ivar framePropName: Assign this property this action current frame number
|
|
|
|
@type framePropName: string
|
|
|
|
@ivar type: Play mode for the ipo. (In GameLogic.KX_IPOACT_PLAY, KX_IPOACT_PINGPONG, KX_IPOACT_FLIPPER, KX_IPOACT_LOOPSTOP, KX_IPOACT_LOOPEND, KX_IPOACT_FROM_PROP)
|
|
|
|
@type type: int
|
|
|
|
@ivar useIpoAsForce: Apply Ipo as a global or local force depending on the local option (dynamic objects only)
|
|
|
|
@type useIpoAsForce: bool
|
|
|
|
@ivar useIpoAdd: Ipo is added to the current loc/rot/scale in global or local coordinate according to Local flag
|
|
|
|
@type useIpoAdd: bool
|
|
|
|
@ivar useIpoLocal: Let the ipo acts in local coordinates, used in Force and Add mode.
|
|
|
|
@type useIpoLocal: bool
|
|
|
|
@ivar useChildren: Update IPO on all children Objects as well
|
|
|
|
@type useChildren: bool
|
2004-06-02 12:43:27 +00:00
|
|
|
"""
|
2008-10-14 22:31:10 +00:00
|
|
|
def set(mode, startframe, endframe, force):
|
2004-06-02 12:43:27 +00:00
|
|
|
"""
|
2009-03-26 01:42:01 +00:00
|
|
|
Sets the properties of the actuator. (B{deprecated})
|
2004-06-02 12:43:27 +00:00
|
|
|
|
|
|
|
@param mode: "Play", "PingPong", "Flipper", "LoopStop", "LoopEnd" or "FromProp"
|
|
|
|
@type mode: string
|
|
|
|
@param startframe: first frame to use
|
|
|
|
@type startframe: integer
|
|
|
|
@param endframe: last frame to use
|
|
|
|
@type endframe: integer
|
2008-10-14 22:31:10 +00:00
|
|
|
@param force: special mode
|
|
|
|
@type force: integer (0=normal, 1=interpret location as force, 2=additive)
|
2004-06-02 12:43:27 +00:00
|
|
|
"""
|
|
|
|
def setProperty(property):
|
|
|
|
"""
|
2009-03-26 01:42:01 +00:00
|
|
|
Sets the name of the property to be used in FromProp mode. (B{deprecated})
|
2004-06-02 12:43:27 +00:00
|
|
|
|
|
|
|
@type property: string
|
|
|
|
"""
|
|
|
|
def setStart(startframe):
|
|
|
|
"""
|
2009-03-26 01:42:01 +00:00
|
|
|
Sets the frame from which the IPO starts playing. (B{deprecated})
|
2004-06-02 12:43:27 +00:00
|
|
|
|
|
|
|
@type startframe: integer
|
|
|
|
"""
|
|
|
|
def getStart():
|
|
|
|
"""
|
2009-03-26 01:42:01 +00:00
|
|
|
Returns the frame from which the IPO starts playing. (B{deprecated})
|
2004-06-02 12:43:27 +00:00
|
|
|
|
|
|
|
@rtype: integer
|
|
|
|
"""
|
|
|
|
def setEnd(endframe):
|
|
|
|
"""
|
2009-03-26 01:42:01 +00:00
|
|
|
Sets the frame at which the IPO stops playing. (B{deprecated})
|
2004-06-02 12:43:27 +00:00
|
|
|
|
|
|
|
@type endframe: integer
|
|
|
|
"""
|
|
|
|
def getEnd():
|
|
|
|
"""
|
2009-03-26 01:42:01 +00:00
|
|
|
Returns the frame at which the IPO stops playing. (B{deprecated})
|
2004-06-02 12:43:27 +00:00
|
|
|
|
|
|
|
@rtype: integer
|
|
|
|
"""
|
|
|
|
def setIpoAsForce(force):
|
|
|
|
"""
|
2009-03-26 01:42:01 +00:00
|
|
|
Set whether to interpret the ipo as a force rather than a displacement. (B{deprecated})
|
2004-06-02 12:43:27 +00:00
|
|
|
|
|
|
|
@type force: boolean
|
|
|
|
@param force: KX_TRUE or KX_FALSE
|
|
|
|
"""
|
|
|
|
def getIpoAsForce():
|
|
|
|
"""
|
2009-03-26 01:42:01 +00:00
|
|
|
Returns whether to interpret the ipo as a force rather than a displacement. (B{deprecated})
|
2004-06-02 12:43:27 +00:00
|
|
|
|
2008-07-23 21:37:37 +00:00
|
|
|
@rtype: boolean
|
|
|
|
"""
|
|
|
|
def setIpoAdd(add):
|
|
|
|
"""
|
2009-03-26 01:42:01 +00:00
|
|
|
Set whether to interpret the ipo as additive rather than absolute. (B{deprecated})
|
2008-07-23 21:37:37 +00:00
|
|
|
|
|
|
|
@type add: boolean
|
|
|
|
@param add: KX_TRUE or KX_FALSE
|
|
|
|
"""
|
|
|
|
def getIpoAdd():
|
|
|
|
"""
|
2009-03-26 01:42:01 +00:00
|
|
|
Returns whether to interpret the ipo as additive rather than absolute. (B{deprecated})
|
2008-07-23 21:37:37 +00:00
|
|
|
|
2004-06-02 12:43:27 +00:00
|
|
|
@rtype: boolean
|
|
|
|
"""
|
|
|
|
def setType(mode):
|
|
|
|
"""
|
2009-03-26 01:42:01 +00:00
|
|
|
Sets the operation mode of the actuator. (B{deprecated})
|
2004-06-02 12:43:27 +00:00
|
|
|
|
|
|
|
@param mode: KX_IPOACT_PLAY, KX_IPOACT_PINGPONG, KX_IPOACT_FLIPPER, KX_IPOACT_LOOPSTOP, KX_IPOACT_LOOPEND
|
|
|
|
@type mode: string
|
|
|
|
"""
|
|
|
|
def getType():
|
|
|
|
"""
|
2009-03-26 01:42:01 +00:00
|
|
|
Returns the operation mode of the actuator. (B{deprecated})
|
2004-06-02 12:43:27 +00:00
|
|
|
|
|
|
|
@rtype: integer
|
|
|
|
@return: KX_IPOACT_PLAY, KX_IPOACT_PINGPONG, KX_IPOACT_FLIPPER, KX_IPOACT_LOOPSTOP, KX_IPOACT_LOOPEND
|
|
|
|
"""
|
|
|
|
def setForceIpoActsLocal(local):
|
|
|
|
"""
|
|
|
|
Set whether to apply the force in the object's local
|
2009-03-26 01:42:01 +00:00
|
|
|
coordinates rather than the world global coordinates. (B{deprecated})
|
2004-06-02 12:43:27 +00:00
|
|
|
|
|
|
|
@param local: Apply the ipo-as-force in the object's local
|
|
|
|
coordinates? (KX_TRUE, KX_FALSE)
|
|
|
|
@type local: boolean
|
|
|
|
"""
|
|
|
|
def getForceIpoActsLocal():
|
|
|
|
"""
|
|
|
|
Return whether to apply the force in the object's local
|
2009-03-26 01:42:01 +00:00
|
|
|
coordinates rather than the world global coordinates. (B{deprecated})
|
2004-06-02 12:43:27 +00:00
|
|
|
"""
|