Module BL_ActionActuator

Source Code for Module BL_ActionActuator

  1  # $Id: BL_ActionActuator.py 2832 2004-07-17 05:28:23Z kester $ 
  2  # Documentation for BL_ActionActuator 
  3  from SCA_IActuator import * 
  4   
5 -class BL_ActionActuator(SCA_IActuator):
6 """ 7 Action Actuators apply an action to an actor. 8 """
9 - def setAction(action, reset = True):
10 """ 11 Sets the current action. 12 13 @param action: The name of the action to set as the current action. 14 @type action: string 15 @param reset: Optional parameter indicating whether to reset the 16 blend timer or not. A value of 1 indicates that the 17 timer should be reset. A value of 0 will leave it 18 unchanged. If reset is not specified, the timer will 19 be reset. 20 """
21
22 - def setStart(start):
23 """ 24 Specifies the starting frame of the animation. 25 26 @param start: the starting frame of the animation 27 @type start: float 28 """
29
30 - def setEnd(end):
31 """ 32 Specifies the ending frame of the animation. 33 34 @param end: the ending frame of the animation 35 @type end: float 36 """
37 - def setBlendin(blendin):
38 """ 39 Specifies the number of frames of animation to generate 40 when making transitions between actions. 41 42 @param blendin: the number of frames in transition. 43 @type blendin: float 44 """
45
46 - def setPriority(priority):
47 """ 48 Sets the priority of this actuator. 49 50 @param priority: Specifies the new priority. Actuators will lower 51 priority numbers will override actuators with higher 52 numbers. 53 @type priority: integer 54 """
55 - def setFrame(frame):
56 """ 57 Sets the current frame for the animation. 58 59 @param frame: Specifies the new current frame for the animation 60 @type frame: float 61 """
62
63 - def setProperty(prop):
64 """ 65 Sets the property to be used in FromProp playback mode. 66 67 @param prop: the name of the property to use. 68 @type prop: string. 69 """
70
71 - def setBlendtime(blendtime):
72 """ 73 Sets the internal frame timer. 74 75 Allows the script to directly modify the internal timer 76 used when generating transitions between actions. 77 78 @param blendtime: The new time. This parameter must be in the range from 0.0 to 1.0. 79 @type blendtime: float 80 """
81
82 - def setType(mode):
83 """ 84 Sets the operation mode of the actuator 85 86 @param mode: KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND 87 @type mode: integer 88 """
89
90 - def getType():
91 """ 92 Returns the operation mode of the actuator 93 94 @rtype: integer 95 @return: KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND 96 """
97
98 - def getAction():
99 """ 100 getAction() returns the name of the action associated with this actuator. 101 102 @rtype: string 103 """
104
105 - def getStart():
106 """ 107 Returns the starting frame of the action. 108 109 @rtype: float 110 """
111 - def getEnd():
112 """ 113 Returns the last frame of the action. 114 115 @rtype: float 116 """
117 - def getBlendin():
118 """ 119 Returns the number of interpolation animation frames to be generated when this actuator is triggered. 120 121 @rtype: float 122 """
123 - def getPriority():
124 """ 125 Returns the priority for this actuator. Actuators with lower Priority numbers will 126 override actuators with higher numbers. 127 128 @rtype: integer 129 """
130 - def getFrame():
131 """ 132 Returns the current frame number. 133 134 @rtype: float 135 """
136 - def getProperty():
137 """ 138 Returns the name of the property to be used in FromProp mode. 139 140 @rtype: string 141 """
142 - def setChannel(channel, matrix, mode = False):
143 """ 144 @param channel: A string specifying the name of the bone channel. 145 @type channel: string 146 @param matrix: A 4x4 matrix specifying the overriding transformation 147 as an offset from the bone's rest position. 148 @type matrix: list [[float]] 149 @param mode: True for armature/world space, False for bone space 150 @type mode: boolean 151 """
152