1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
|
# Blender.Ipo module and the Ipo PyType object
"""
The Blender.Ipo submodule
This module provides access to the Ipo Data in Blender. An Ipo is composed of several Ipocurves.
A datatype is defined : IpoCurve type. The member functions of this data type are given below.
Example::
import Blender
ob = Blender.Ipo.Get('ipo') # retreives an ipo object
ob.setName('ipo1')
print ob.name
print ipo.getRctf()
ipo.setRctf(1,2,3,4)
"""
def New (type, name):
"""
Creates a new Ipo.
@type type: string
@type name: string
@param type: The Ipo's blocktype. Depends on the object the ipo will be linked to. \
Currently supported types are Object, Camera, World, Material.
@param name: The name for this Ipo.
@rtype: Blender Ipo
@return: The created Ipo.
"""
def Get (name = None):
"""
Get the Ipo from Blender.
@type name: string
@param name: The name of the requested Ipo, or nothing.
@rtype: Blender Ipo or a list of Blender Ipos
@return: It depends on the 'name' parameter:
- (name): The Ipo with the given name;
- (): A list with all Ipos in the current scene.
"""
class Ipo:
"""
The Ipo object
==============
This object gives access to generic data from all objects in Blender.
This object has no attribute.
"""
def getName():
"""
Gets the name of the Ipo.
@rtype: string
@return: the name of the Ipo.
"""
def getCurves():
"""
Gets all the IpoCurves of the Ipo.
@rtype: list of IpoCurves
@return: A list (possibly void) containing all the IpoCurves associated to the Ipo object.
"""
def getCurve(curvename):
"""
Returns the IpoCurve with the given name.
The possible values for curvename are R,G,B,SpecR,SpecG,SpecB,MirR,MirG,MirB,Ref,Alpha,Emit,Amb,Spec,Hard,SpTra,Ang,Mode,HaSize,OfsX,OfsY,OfsZ,SizeX,SizeY,SizeZ,TexR,TexG,TexB,DefVar,Col,Nor,Var(Material 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 (World 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 (Object Ipo)
Lens,ClSta,ClEnd (Camera Ipo)
@type curvename : string
@rtype: IpoCurve object
@return: the corresponding IpoCurve, or None.
"""
def setName(newname):
"""
Sets the name of the Ipo.
@type newname: string
@rtype: PyNone
@return: PyNone
"""
def getBlocktype():
"""
Gets the blocktype of the Ipo.
@rtype: int
@return: the blocktype of the Ipo.
"""
def setBlocktype(newblocktype):
"""
Sets the blocktype of the Ipo.
@type newblocktype: int. This value should not be changed, unless you really know what you do...
@rtype: PyNone
@return: PyNone
"""
def getRctf():
"""
Gets the rctf of the Ipo.
Kind of bounding box...
@rtype: list of floats
@return: the rctf of the Ipo.
"""
def setRctf(newrctf):
"""
Sets the rctf of the Ipo.
@type newrctf: four floats . This value should not be changed, unless you really know what you do...
@rtype: PyNone
@return: PyNone
"""
def getNcurves():
"""
Gets the number of curves of the Ipo.
@rtype: int
@return: the number of curve of the Ipo.
"""
def getCurveBP(curvepos):
"""
Gets the basepoint of a curve of the ipo.
@type curvepos: int
@param curvepos: the position of the curve.
@rtype: a list of 4 floats
@return: the coordinates of the basepoint, or an error is raised.
"""
def getBeztriple(curvepos,pointpos):
"""
Gets a beztriple of the Ipo.
@type curvepos: int
@param curvepos: the position of the curve in the ipo
@type pointpos: int
@param pointpos: the position of the point in the curve.
@rtype: list of 9 floats
@return: the beztriple of the Ipo, or an error is raised.
"""
def setBeztriple(curvepos,pointpos,newbeztriple):
"""
Sets the beztriple of the Ipo.
@type curvepos: int
@param curvepos: the position of the curve in the ipo
@type pointpos: int
@param pointpos: the position of the point in the curve.
@type newbeztriple: list of 9 floats
@param newbeztriple: the new value for the point
@rtype: PyNone
@return: PyNone
"""
def getCurvecurval(curvepos):
"""
Gets the current value of a curve of the Ipo.
@type curvepos: int or string
@param curvepos: the position of the curve in the ipo or the name of the curve
@rtype: float
@return: the current value of the selected curve of the Ipo.
"""
def EvaluateCurveOn(curvepos,time):
"""
Gets the current value of a curve of the Ipo.
@type curvepos: int
@param curvepos: the position of the curve in the ipo
@type time: float
@param time: the position of the curve in the ipo
@rtype: float
@return: the current value of the selected curve of the Ipo at the given time.
"""
class IpoCurve:
"""
The IpoCurve object
===================
This object gives access to generic data from all ipocurves objects in Blender.
Important Notes for Rotation Curves:\n
For the rotation IpoCurves, the y values for points are in units of 10 degrees. example: 45.0 degrees is stored as 4.50 degrees. These are the same numbers you see in the Transform Properties pupmenu ( NKey ) in the IPO Curve Editor window. Positive rotations are in a counter-clockwise direction, just like in math class.
@cvar name: The Curve Data name.
@cvar bezierPoints : The list of the Bezier points.
"""
def setExtrapolation(extrapolationtype):
"""
Sets the extrapolation type of the curve.
@type extrapolationtype: string
@param extrapolationtype: the extrapolatrion type of the curve. Can be Constant, Extrapolation, Cyclic or Cyclic_extrapolation.
@rtype: PyNone
@return: PyNone
"""
def getExtrapolation():
"""
Gets the extrapolation type of the curve.
@rtype: string
@return: the extrapolation type of the curve.Can be Constant, Extrapolation, Cyclic or Cyclic_extrapolation.
"""
def setInterpolation(interpolationtype):
"""
Sets the interpolation type of the curve.
@type interpolationtype: string
@param interpolationtype: the interpolatrion type of the curve. Can be Constant, Bezier, or Linear.
@rtype: PyNone
@return: PyNone
"""
def getInterpolation():
"""
Gets the interpolation type of the curve.
@rtype: string
@return: the interpolation type of the curve.Can be Constant, Bezier, or Linear.
"""
def addBezier(coordlist):
"""
Adds a Bezier point to a curve.
@type coordlist: tuple of (at least) 2 floats
@param coordlist: the x and y coordinates of the new Bezier point.
@rtype: PyNone
@return: PyNone
"""
def Recalc():
"""
Recomputes the curent value of the curve.
@rtype: PyNone
@return: PyNone
"""
def getName():
"""
Returns the name of the ipo curve.This name can be : LocX,LocY,LocZ,dLocX,dLocY,dLocZ,RotX,RotY,RotZ,dRotX,dRotY,dRotZ,SizeX,SizeY,SizeZ,dSizeX,dSizeY,dSizeZ,Layer,Time,ColR,ColG,ColB, or ColA.
@rtype: string
@return: the name of the ipo curve.
"""
def getPoints():
"""
Returns all the points of the ipo curve.
@rtype: list of BezTriples
@return: the points of the ipo curve.
"""
class BezTriple:
"""
The BezTriple object
====================
This object gives access to generic data from all beztriple objects in Blender.
@cvar name: The Curve Data name.
@cvar bezierPoints : The list of the Bezier points.
"""
def getPoints():
"""
Returns the xy coordinates of the Bezier point.
@rtype: list of floats
@return: list of the x and y coordinates of the Bezier point.
"""
def setPoints(newval):
"""
Sets the point xy coordinates.
@type newval: tuple of (at least) 2 floats
@param newval: the x and y coordinates of the new Bezier point.
@rtype: PyNone
@return: PyNone
"""
|