116
116
def New (name = None):
118
Return a new armature.
119
@type name: string or nothing
120
@param name: The string name of the new armature.
121
@rtype: Blender Armature.
122
@return: A new armature.
118
Return a new armature.
119
@type name: string or nothing
120
@param name: The string name of the new armature.
121
@rtype: Blender Armature.
122
@return: A new armature.
129
This object gives access to Armature-specific data in Blender.
130
@ivar name: The Armature name.
132
@ivar bones: A Dictionary of Bones (BonesDict) that make up this armature.
133
@type bones: BonesDict Object
134
@ivar vertexGroups: Whether vertex groups define deformation
135
@type vertexGroups: Bool
136
@ivar envelopes: Whether bone envelopes define deformation
137
@type envelopes: Bool
138
@ivar restPosition: Show rest position (no posing possible)
139
@type restPosition: Bool
140
@ivar delayDeform: Don't deform children when manipulating bones
141
@type delayDeform: Bool
142
@ivar drawAxes: Draw bone axes
144
@ivar drawNames: Draw bone names
145
@type drawNames: Bool
146
@ivar ghost: Draw ghosts around frame for current Action
148
@ivar ghostStep: Number of frames between ghosts
150
@ivar drawType: The drawing type that is used to display the armature
151
Acceptable values are:
152
- Armature.OCTAHEDRON: bones drawn as octahedrons
153
- Armature.STICK: bones drawn as sticks
154
- Armature.BBONE: bones drawn as b-bones
155
- Armature.ENVELOPE: bones drawn as sticks with envelopes
156
@type drawType: Constant Object
157
@ivar mirrorEdit: X-axis mirrored editing
158
@type mirrorEdit: Bool
159
@ivar autoIK: Adds temporary IK chains while grabbing bones
161
@ivar users: The number of users of the armature. Read-only.
163
@ivar fakeUser: The fake user status.
164
Enabling this will keep it in the blend even if there are no users.
168
def __init__(name = 'myArmature'):
170
Initializer for the Armature TypeObject.
172
myNewArmature = Blender.Armature.Armature('AR_1')
173
@param name: The name for the new armature
175
@return: New Armature Object
176
@rtype: Armature Object
181
Put the armature into EditMode for editing purposes. (Enters Editmode)
182
@warning: Using Window.Editmode() to switch the editmode manually will cause problems and possibly even crash Blender.
183
@warning: This is only needed for operations such as adding and removing bones.
184
@warning: Do access pose data until you have called update() or settings will be lost.
185
@warning: The armature should not be in manual editmode
186
prior to calling this method. The armature must be parented
187
to an object prior to editing.
193
Save all changes and update the armature. (Leaves Editmode)
194
@note: Must have called makeEditable() first.
129
This object gives access to Armature-specific data in Blender.
130
@ivar bones: A Dictionary of Bones (BonesDict) that make up this armature.
131
@type bones: BonesDict Object
132
@ivar vertexGroups: Whether vertex groups define deformation
133
@type vertexGroups: Bool
134
@ivar envelopes: Whether bone envelopes define deformation
135
@type envelopes: Bool
136
@ivar restPosition: Show rest position (no posing possible)
137
@type restPosition: Bool
138
@ivar delayDeform: Don't deform children when manipulating bones
139
@type delayDeform: Bool
140
@ivar drawAxes: Draw bone axes
142
@ivar drawNames: Draw bone names
143
@type drawNames: Bool
144
@ivar ghost: Draw ghosts around frame for current Action
146
@ivar ghostStep: Number of frames between ghosts
148
@ivar drawType: The drawing type that is used to display the armature
149
Acceptable values are:
150
- Armature.OCTAHEDRON: bones drawn as octahedrons
151
- Armature.STICK: bones drawn as sticks
152
- Armature.BBONE: bones drawn as b-bones
153
- Armature.ENVELOPE: bones drawn as sticks with envelopes
154
@type drawType: Constant Object
155
@ivar mirrorEdit: X-axis mirrored editing
156
@type mirrorEdit: Bool
157
@ivar autoIK: Adds temporary IK chains while grabbing bones
161
def __init__(name = 'myArmature'):
163
Initializer for the Armature TypeObject.
165
myNewArmature = Blender.Armature.Armature('AR_1')
166
@param name: The name for the new armature
168
@return: New Armature Object
169
@rtype: Armature Object
174
Put the armature into EditMode for editing purposes. (Enters Editmode)
175
@warning: Using Window.Editmode() to switch the editmode manually will cause problems and possibly even crash Blender.
176
@warning: This is only needed for operations such as adding and removing bones.
177
@warning: Do access pose data until you have called update() or settings will be lost.
178
@warning: The armature should not be in manual editmode
179
prior to calling this method. The armature must be parented
180
to an object prior to editing.
186
Save all changes and update the armature. (Leaves Editmode)
187
@note: Must have called makeEditable() first.
192
Armature.__doc__ += id_generics.attributes
202
This object gives gives dictionary like access to the bones in an armature.
203
It is internal to blender but is called as 'Armature.bones'
207
del myArmature.bones['bone_name']
210
myEditBone = Armature.Editbone()
211
myArmature.bones['bone_name'] = myEditBone
216
Return the key, value pairs in this dictionary
217
@rtype: string, BPy_bone
218
@return: All strings, and py_bones in the armature (in that order)
223
Return the keys in this dictionary
225
@return: All strings representing the bone names
230
Return the values in this dictionary
232
@return: All BPy_bones in this dictionary
198
This object gives gives dictionary like access to the bones in an armature.
199
It is internal to blender but is called as 'Armature.bones'
203
del myArmature.bones['bone_name']
206
myEditBone = Armature.Editbone()
207
myArmature.bones['bone_name'] = myEditBone
212
Return the key, value pairs in this dictionary
213
@rtype: string, BPy_bone
214
@return: All strings, and py_bones in the armature (in that order)
219
Return the keys in this dictionary
221
@return: All strings representing the bone names
226
Return the values in this dictionary
228
@return: All BPy_bones in this dictionary
239
This object gives access to Bone-specific data in Blender. This object
240
cannot be instantiated but is returned by BonesDict when the armature is not in editmode.
241
@ivar name: The name of this Bone.
243
@ivar roll: This Bone's roll value.
245
- 'ARMATURESPACE' - this roll in relation to the armature
246
- 'BONESPACE' - the roll in relation to itself
247
@type roll: Dictionary
248
@ivar head: This Bone's "head" ending position when in rest state.
250
- 'ARMATURESPACE' - this head position in relation to the armature
251
- 'BONESPACE' - the head position in relation to itself
252
@type head: Dictionary
253
@ivar tail: This Bone's "tail" ending position when in rest state.
255
- 'ARMATURESPACE' - this tail position in relation to the armature
256
- 'BONESPACE' - the tail position in relation to itself
257
@type tail: Dictionary
258
@ivar matrix: This Bone's matrix. This cannot be set.
260
- 'ARMATURESPACE' - this matrix of the bone in relation to the armature
261
- 'BONESPACE' - the matrix of the bone in relation to itself
262
@type matrix: Matrix Object
263
@ivar parent: The parent Bone.
264
@type parent: Bone Object
265
@ivar children: The children directly attached to this bone.
266
@type children: List of Bone Objects
267
@ivar weight: The bone's weight.
269
@ivar options: Various bone options which can be:
270
- Armature.CONNECTED: IK to parent
271
- Armature.HINGE: No parent rotation or scaling
272
- Armature.NO_DEFORM: The bone does not deform geometry
273
- Armature.MULTIPLY: Multiply vgroups by envelope
274
- Armature.HIDDEN_EDIT: Hide bones in editmode
275
- Armature.ROOT_SELECTED: Selection of root ball of bone
276
- Armature.BONE_SELECTED: Selection of bone
277
- Armature.TIP_SELECTED: Selection of tip ball of bone
278
@type options: List of Constants
279
@ivar subdivision: The number of bone subdivisions.
280
@type subdivision: Int
281
@ivar deformDist: The deform distance of the bone
282
@type deformDist: Float
283
@ivar length: The length of the bone. This cannot be set.
285
@ivar headRadius: The radius of this bones head (used for envalope bones)
286
@type headRadius: Float
287
@ivar tailRadius: The radius of this bones head (used for envalope bones)
288
@type tailRadius: Float
293
Whether or not this bone has a parent
299
Whether or not this bone has children
303
def getAllChildren():
305
Gets all the children under this bone including the children's children.
306
@rtype: List of Bone object
307
@return: all bones under this one
235
This object gives access to Bone-specific data in Blender. This object
236
cannot be instantiated but is returned by BonesDict when the armature is not in editmode.
237
@ivar name: The name of this Bone.
239
@ivar roll: This Bone's roll value.
241
- 'ARMATURESPACE' - this roll in relation to the armature
242
- 'BONESPACE' - the roll in relation to itself
243
@type roll: Dictionary
244
@ivar head: This Bone's "head" ending position when in rest state.
246
- 'ARMATURESPACE' - this head position in relation to the armature
247
- 'BONESPACE' - the head position in relation to itself.
248
@type head: Dictionary
249
@ivar tail: This Bone's "tail" ending position when in rest state.
251
- 'ARMATURESPACE' - this tail position in relation to the armature
252
- 'BONESPACE' - the tail position in relation to itself
253
@type tail: Dictionary
254
@ivar matrix: This Bone's matrix. This cannot be set.
256
- 'ARMATURESPACE' - this matrix of the bone in relation to the armature
257
- 'BONESPACE' - the matrix of the bone in relation to itself
258
@type matrix: Matrix Object
259
@ivar parent: The parent Bone.
260
@type parent: Bone Object
261
@ivar children: The children directly attached to this bone.
262
@type children: List of Bone Objects
263
@ivar weight: The bone's weight.
265
@ivar options: Various bone options which can be:
266
- Armature.CONNECTED: IK to parent
267
- Armature.HINGE: No parent rotation or scaling
268
- Armature.NO_DEFORM: The bone does not deform geometry
269
- Armature.MULTIPLY: Multiply vgroups by envelope
270
- Armature.HIDDEN_EDIT: Hide bones in editmode
271
- Armature.ROOT_SELECTED: Selection of root ball of bone
272
- Armature.BONE_SELECTED: Selection of bone
273
- Armature.TIP_SELECTED: Selection of tip ball of bone
274
@type options: List of Constants
275
@ivar subdivision: The number of bone subdivisions.
276
@type subdivision: Int
277
@ivar deformDist: The deform distance of the bone
278
@type deformDist: Float
279
@ivar length: The length of the bone. This cannot be set.
281
@ivar headRadius: The radius of this bones head (used for envalope bones)
282
@type headRadius: Float
283
@ivar tailRadius: The radius of this bones head (used for envalope bones)
284
@type tailRadius: Float
289
Whether or not this bone has a parent
295
Whether or not this bone has children
299
def getAllChildren():
301
Gets all the children under this bone including the children's children.
302
@rtype: List of Bone object
303
@return: all bones under this one
314
This object is a wrapper for editbone data and is used only in the manipulation
315
of the armature in editmode.
316
@ivar name: The name of this Bone.
318
@ivar roll: This Bone's roll value (armaturespace).
320
@ivar head: This Bone's "head" ending position when in rest state (armaturespace).
321
@type head: Vector Object
322
@ivar tail: This Bone's "tail" ending position when in rest state (armaturespace).
323
@type tail: Vector Object
324
@ivar matrix: This Bone's matrix. (armaturespace)
325
@type matrix: Matrix Object
326
@ivar parent: The parent Bone.
327
@type parent: Editbone Object
328
@ivar weight: The bone's weight.
330
@ivar options: Various bone options which can be:
331
- Armature.CONNECTED: IK to parent
332
- Armature.HINGE: No parent rotation or scaling
333
- Armature.NO_DEFORM: The bone does not deform geometry
334
- Armature.MULTIPLY: Multiply vgroups by envelope
335
- Armature.HIDDEN_EDIT: Hide bones in editmode
336
- Armature.ROOT_SELECTED: Selection of root ball of bone
337
- Armature.BONE_SELECTED: Selection of bone
338
- Armature.TIP_SELECTED: Selection of tip ball of bone
339
@type options: List of Constants
340
@ivar subdivision: The number of bone subdivisions.
341
@type subdivision: Int
342
@ivar deformDist: The deform distance of the bone
343
@type deformDist: Float
344
@ivar length: The length of the bone. This cannot be set.
346
@ivar headRadius: The radius of this bones head (used for envalope bones)
347
@type headRadius: Float
348
@ivar tailRadius: The radius of this bones head (used for envalope bones)
349
@type tailRadius: Float
354
Whether or not this bone has a parent
360
Set the parent to None
310
This object is a wrapper for editbone data and is used only in the manipulation
311
of the armature in editmode.
312
@ivar name: The name of this Bone.
314
@ivar roll: This Bone's roll value (armaturespace).
316
@ivar head: This Bone's "head" ending position when in rest state (armaturespace).
317
@type head: Vector Object
318
@ivar tail: This Bone's "tail" ending position when in rest state (armaturespace).
319
@type tail: Vector Object
320
@ivar matrix: This Bone's matrix. (armaturespace)
321
@type matrix: Matrix Object
322
@ivar parent: The parent Bone.
323
@type parent: Editbone Object
324
@ivar weight: The bone's weight.
326
@ivar options: Various bone options which can be:
327
- Armature.CONNECTED: IK to parent
328
- Armature.HINGE: No parent rotation or scaling
329
- Armature.NO_DEFORM: The bone does not deform geometry
330
- Armature.MULTIPLY: Multiply vgroups by envelope
331
- Armature.HIDDEN_EDIT: Hide bones in editmode
332
- Armature.ROOT_SELECTED: Selection of root ball of bone
333
- Armature.BONE_SELECTED: Selection of bone
334
- Armature.TIP_SELECTED: Selection of tip ball of bone
335
@type options: List of Constants
336
@ivar subdivision: The number of bone subdivisions.
337
@type subdivision: Int
338
@ivar deformDist: The deform distance of the bone
339
@type deformDist: Float
340
@ivar length: The length of the bone. This cannot be set.
342
@ivar headRadius: The radius of this bones head (used for envalope bones)
343
@type headRadius: Float
344
@ivar tailRadius: The radius of this bones head (used for envalope bones)
345
@type tailRadius: Float
350
Whether or not this bone has a parent
356
Set the parent to None