31
38
- (): A list with all Metaballs in the current scene.
37
43
The Metaball object
38
44
===================
39
45
This metaball gives access to generic data from all metaballs in Blender.
40
@cvar name: The name of the metaball.
41
@cvar loc: The location of the metaball.
42
@cvar rot: The rotation of the metaball.
43
@cvar size: The size of the metaball.
46
@ivar name: The name of the metaball.
47
@ivar loc: The location of the metaball.
48
@ivar rot: The rotation of the metaball.
49
@ivar size: The size of the metaball.
52
def addMetaelem(paramslist):
54
Add a new metaelem to this metaball. 'paramslist' must have the
55
following ten elements:
56
- param 1: int - metaelem type:
61
- 4 for a regular tube
65
- params 2,3,4: floats - the x, y and z coordinates of the metaelem.
66
- param 5: float - the rad value of the metaelem.
67
- param 6: int - the lay value.
68
- param 7: float - the s value of the metaelem.
69
- params 8,9,10: floats - the expx, expy and expz values of the metaelem.
70
@type paramslist: list
71
@param paramslist: the list of the parameters for creating a new metaelem.
77
def getMetaElemList():
79
retreives the list of the Metaelems of the Metaball
81
@return: List of Metaelem classes
82
Each Metaelem object has NO function, but 4 read/write fields\n
83
coords : a list of three floats, the coordinates of the Metaelem object\n
84
dims : a list of three floats, the dimensions of the meteelem object\n
85
rad : a float, the radius of the object\n
86
stif : a float, the stifness of the object\n
90
mb = Blender.Metaball.Get("mball")\n
91
ob = Blender.Object.Get("ob")\n
92
ll = mb.getMetaElemList()\n
95
new = [old[0],old[1],old[2]-.02]\n
98
ob.makeDisplayList()\n
99
Blender.Window.QRedrawAll()
48
Retreives the name of a metaball object
104
Retrieves the name of a metaball object.
50
@return: the name of a metaball object
106
@return: the name of a metaball object.
54
110
def setName(name):
56
Sets the name of a metaball object
112
Sets the name of a metaball object.
57
113
@type name: string
58
114
@param name : the new name
67
Retreives the bounding box of a metaball object
123
Retrieves the bounding box of a metaball object.
68
124
@rtype: a list of 24 floats(8 points, 3 coordinates)
69
125
@return: the bounding box of a metaball object
72
128
def getNMetaElems():
74
Retreives the number of metaelems (elementary spheres or cylinders) of a metaball object
130
Retrieves the number of metaelems (elementary spheres or cylinders) of a metaball object.
76
132
@return: number of metaelems of a metaball object
81
Retreives the location of a metaball object
137
Retrieves the location of a metaball object.
82
138
@rtype: a list of 3 floats
83
@return: locationof a metaball object
139
@return: location of a metaball object
86
142
def setLoc(newloc):
88
Sets the location of a metaball object
144
Sets the location of a metaball object.
89
145
@type newloc: list of 3 floats
90
146
@param newloc: the new location
97
Retreives the rotation of a metaball object
153
Retrieves the rotation of a metaball object.
98
154
@rtype: a list of 3 floats
99
@return: rotationof a metaball object
155
@return: rotation of a metaball object
102
158
def setRot(newrot):
104
Sets the rotation of a metaball object
160
Sets the rotation of a metaball object.
105
161
@type newrot: list of 3 floats
106
162
@param newrot: the new rotation
113
Retreives the size of a metaball object
169
Retrieves the size of a metaball object.
114
170
@rtype: a list of 3 floats
115
171
@return: size a metaball object
118
174
def setSize(newsize):
120
Sets the size of a metaball object
176
Sets the size of a metaball object.
121
177
@type newsize: list of 3 floats
122
178
@param newsize: the new size
127
183
def getWiresize():
129
Retreives the wiresize of a metaball object
185
Retrieves the wiresize of a metaball object.
131
187
@return: wire size a metaball object
134
190
def setWiresize(newsize):
136
Sets the wire size of a metaball object
192
Sets the wire size of a metaball object.
137
193
@type newsize: float
138
194
@param newsize: the new size
142
198
def getRendersize():
144
Retreives the rendersize of a metaball object
200
Retrieves the rendersize of a metaball object.
146
202
@return: render size a metaball object
149
205
def setRendersize(newsize):
151
Sets the render size of a metaball object
207
Sets the render size of a metaball object.
152
208
@type newsize: float
153
209
@param newsize: the new size
160
Retreives the threshold of a metaball object
216
Retrieves the threshold of a metaball object.
162
218
@return: threshold of the metaball object
165
221
def setThresh(threshold):
167
Sets the threshold of a metaball object
223
Sets the threshold of a metaball object.
168
224
@type threshold: float
169
225
@param threshold: the new size
174
230
def getMetadata(name,num):
185
241
def setMetadata(name,num,val):
187
The setMetadata function has the same semantics as getMetadata, except that it needs the parameter value, and always returns PyNone.
243
The setMetadata function has the same semantics as getMetadata, except that it needs the parameter value, and always returns None.
188
244
@type name: string
189
245
@param name: the name of the property to be read. The accepted values are :"type", "x", "y", "z", "expx", "expy", "expz", "rad", "rad2", "s", "len".
191
247
@param num: the position of the metaelem to be accessed.
192
248
@type val: float, except if name is "type".
193
249
@param val: the new value of the parameter.
198
254
def getMetatype(pos):
200
Retreives the type of a metaelem object
256
Retrieves the type of a metaelem object.
202
@param : the position of the metaelement
258
@param pos: the position of the metaelement
204
260
@return: type of the metaelem object
207
263
def setMetatype(pos,newtype):
209
Sets the type of a metaelem object
265
Sets the type of a metaelem object.
211
@param : the position of the metaelement
267
@param pos: the position of the metaelement
212
268
@type newtype: int
213
269
@param newtype: the new type
218
274
def getMetax(pos):
220
Retreives the x parameter of a metaelem object
276
Retrieves the x parameter of a metaelem object.
222
@param : the position of the metaelement
278
@param pos: the position of the metaelement
224
280
@return: x parameter of the metaelem object
227
283
def setMetax(pos,newx):
229
Sets the x parameter of a metaelem object
285
Sets the x parameter of a metaelem object.
231
@param : the position of the metaelement
287
@param pos: the position of the metaelement
232
288
@type newx: float
233
289
@param newx: the new x parameter value
238
294
def getMetay(pos):
240
Retreives the y parameter of a metaelem object
296
Retrieves the y parameter of a metaelem object.
242
@param : the position of the metaelement
298
@param pos: the position of the metaelement
244
300
@return: y parameter of the metaelem object
247
303
def setMetay(pos,newy):
249
Sets the y parameter of a metaelem object
305
Sets the y parameter of a metaelem object.
251
@param : the position of the metaelement
307
@param pos: the position of the metaelement
252
308
@type newy: float
253
309
@param newy: the new y parameter value
258
314
def getMetaz(pos):
260
Retreives the z parameter of a metaelem object
316
Retrieves the z parameter of a metaelem object.
262
@param : the position of the metaelement
318
@param pos: the position of the metaelement
264
320
@return: z parameter of the metaelem object
267
323
def setMetaz(pos,newz):
269
Sets the z parameter of a metaelem object
325
Sets the z parameter of a metaelem object.
271
@param : the position of the metaelement
327
@param pos: the position of the metaelement
272
328
@type newz: float
273
329
@param newz: the new z parameter value
279
335
def getMetas(pos):
281
Retreives the s parameter of a metaelem object
337
Retrieves the s parameter of a metaelem object.
283
@param : the position of the metaelement
339
@param pos: the position of the metaelement
285
341
@return: s parameter of the metaelem object
288
344
def setMetas(pos,news):
290
Sets the s parameter of a metaelem object
346
Sets the s parameter of a metaelem object.
292
@param : the position of the metaelement
348
@param pos: the position of the metaelement
293
349
@type news: float
294
350
@param news: the new x parameter value
299
355
def getMetalen(pos):
301
Retreives the len parameter of a metaelem object
357
Retrieves the len parameter of a metaelem object.
303
@param : the position of the metaelement
359
@param pos: the position of the metaelement
305
361
@return: len parameter of the metaelem object
308
364
def setMetalen(pos,newlen):
310
Sets the len parameter of a metaelem object
366
Sets the len parameter of a metaelem object.
312
@param : the position of the metaelement
368
@param pos: the position of the metaelement
313
369
@type newlen: float
314
370
@param newlen: the new x parameter value