Module Armature :: Class Armature
[frames] | no frames]

Class Armature

The Armature object

This object gives access to Armature-specific data in Blender.

Instance Methods
Armature Object
__init__(name='myArmature')
Initializer for the Armature TypeObject.
None
makeEditable()
Put the armature into EditMode for editing purposes.
None
update()
Save all changes and update the armature.
Armature
copy()
Return a copy of this armature.
Armature
__copy__()
Return a copy of this armature.
Instance Variables
Bool autoIK
Adds temporary IK chains while grabbing bones
BonesDict Object bones
A Dictionary of Bones (BonesDict) that make up this armature.
Bool delayDeform
Don't deform children when manipulating bones
Bool drawAxes
Draw bone axes
Bool drawNames
Draw bone names
Constant Object drawType
The drawing type that is used to display the armature Acceptable values are:
Bool envelopes
Whether bone envelopes define deformation
bool fakeUser
When set to True, this datablock wont be removed, even if nothing is using it.
Bool ghost
Draw ghosts around frame for current Action
Int ghostStep
Number of frames between ghosts
Int layerMask
Layer bitmask Example:
string or None lib
path to the blend file this datablock is stored in (readonly).
Bool mirrorEdit
X-axis mirrored editing
string name
unique name within each blend file.
IDGroup properties
Returns an IDGroup reference to this datablocks's ID Properties.
Bool restPosition
Show rest position (no posing possible)
bool tag
A temporary tag that to flag data as being used within a loop.
int users
The number of users this datablock has.
Bool vertexGroups
Whether vertex groups define deformation
Method Details

__init__(name='myArmature')
(Constructor)

 

Initializer for the Armature TypeObject. Example:

         myNewArmature = Blender.Armature.Armature('AR_1')
Parameters:
  • name (string) - The name for the new armature
Returns: Armature Object
New Armature Object

makeEditable()

 

Put the armature into EditMode for editing purposes. (Enters Editmode)

Returns: None
Warnings:
  • Using Window.Editmode() to switch the editmode manually will cause problems and possibly even crash Blender.
  • This is only needed for operations such as adding and removing bones.
  • Do access pose data until you have called update() or settings will be lost.
  • The armature should not be in manual editmode prior to calling this method. The armature must be parented to an object prior to editing.

update()

 

Save all changes and update the armature. (Leaves Editmode)

Returns: None

Note: Must have called makeEditable() first.


Instance Variable Details

drawType

The drawing type that is used to display the armature Acceptable values are:
  • Armature.OCTAHEDRON: bones drawn as octahedrons
  • Armature.STICK: bones drawn as sticks
  • Armature.BBONE: bones drawn as b-bones
  • Armature.ENVELOPE: bones drawn as sticks with envelopes
Type:
Constant Object

fakeUser

When set to True, this datablock wont be removed, even if nothing is using it. All data has this disabled by default except for Actions.
Type:
bool

layerMask

Layer bitmask Example:
       # set armature to layers 14 and 16
       armature.layerMask = (1<<13) + (1<<15)
Type:
Int

lib

path to the blend file this datablock is stored in (readonly).

lib will be None unless you are using external blend files with (File, Append/Link)

Note: the path may be relative, to get the full path use Blender.sys.expandpath

Type:
string or None

name

unique name within each blend file.

The name is case sensitive and 21 characters maximum length.

Note: a blend file may have naming collisions when external library data is used, be sure to check the value of lib.

Note: Setting a value longer then 21 characters will be shortened

Type:
string

tag

A temporary tag that to flag data as being used within a loop. always set all tags to True or False before using since blender uses this flag for its own internal operations.
Type:
bool

users

The number of users this datablock has. (readonly) Zero user datablocks are de-allocated after reloading and saving.
Type:
int