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

Class Bone


The Bone object

This object gives access to Bone-specific data in Blender.
Method Summary
  clearChildren()
Attemps to remove all the children of this bone.
  clearParent()
Attempts to clear the parenting of this bone.
list of Blender Bones getChildren()
Get this Bone's children Bones, if available.
list of three floats getHead()
Get the "head" ending position.
list of three floats getLoc()
Get the location of this Bone.
string getName()
Get the name of this Bone.
Blender Bone getParent()
Get this Bone's parent Bone, if available.
Quaternion object. getQuat()
Get this Bone's quaternion.
float getRoll()
Get the roll value.
list of three floats getSize()
Get the size attribute.
list of three floats getTail()
Get the "tail" ending position.
float getWeight()
Get the bone's weight.
true or false hasParent()
True if this Bone has a parent Bone.
  hide()
Hides this bone.
  setHead(x, y, z)
Set the "head" ending position.
  setLoc(x, y, z)
Set the new location for this Bone.
  setName(name)
Rename this Bone.
  setParent(bone)
Set the bones's parent in the armature.
  setPose(flags, Action)
Set the pose for this bone.
  setQuat(quat)
Set the new quaternion for this Bone.
  setRoll(roll)
Set the roll value.
  setSize(x, y, z)
Set the new size for this Bone.
  setTail(x, y, z)
Set the "tail" ending position.
  setWeight(weight)
Set the bones's weight.
  unhide()
Unhide this bone.

Class Variable Summary
  children: The children bones.
  head: This Bone's "head" ending position when in rest state.
  loc: This Bone's location.
  name: The name of this Bone.
  parent: The parent Bone.
  quat: This Bone's quaternion.
  roll: This Bone's roll value.
  size: This Bone's size.
  tail: This Bone's "tail" ending position when in rest state.
  weight: The bone's weight.

Method Details

clearChildren()

Attemps to remove all the children of this bone. Because each of the children no longer are parented they will be set a root bones in the armature.

clearParent()

Attempts to clear the parenting of this bone. Because the bone is no longer parented it will be set in the armature as a root bone.

getChildren()

Get this Bone's children Bones, if available.
Returns:
list of Blender Bones

getHead()

Get the "head" ending position.
Returns:
list of three floats

getLoc()

Get the location of this Bone.
Returns:
list of three floats

getName()

Get the name of this Bone.
Returns:
string

getParent()

Get this Bone's parent Bone, if available.
Returns:
Blender Bone

getQuat()

Get this Bone's quaternion.
Returns:
Quaternion object.

getRoll()

Get the roll value.
Returns:
float

Warning: Roll values are local to parent's objectspace when bones are parented.

getSize()

Get the size attribute.
Returns:
list of three floats

getTail()

Get the "tail" ending position.
Returns:
list of three floats

getWeight()

Get the bone's weight.
Returns:
float

hasParent()

True if this Bone has a parent Bone.
Returns:
true or false

hide()

Hides this bone.

setHead(x, y, z)

Set the "head" ending position.
Parameters:
x - The new x value.
           (type=float)
y - The new y value.
           (type=float)
z - The new z value.
           (type=float)

setLoc(x, y, z)

Set the new location for this Bone.
Parameters:
x - The new x value.
           (type=float)
y - The new y value.
           (type=float)
z - The new z value.
           (type=float)

setName(name)

Rename this Bone.
Parameters:
name - The new name.
           (type=string)

setParent(bone)

Set the bones's parent in the armature.
Parameters:
bone - The Python bone that is the parent to this bone.
           (type=PyBone)

setPose(flags, Action)

Set the pose for this bone. The pose will be set at the Scene's current frame. If an action is passed as the optional second parameter the pose will be added as a keyframe to that action. Otherwise a default action will be created an the pose set to it.
Parameters:
flags - expects ROT, LOC, SIZE in a list. Whichever of these is passed the keyframe generated will set information about the rotation, and/or location, and/or size of the bone.
           (type=PyList of enums)
Action - a python action that has either been created or returned from an object
           (type=PyAction)

setQuat(quat)

Set the new quaternion for this Bone.
Parameters:
quat - Can be a Quaternion or PyList of 4 floats.
           (type=Quaternion object or PyList of floats)

setRoll(roll)

Set the roll value.
Parameters:
roll - The new value.
           (type=float)

Warning: Roll values are local to parent's objectspace when bones are parented.

setSize(x, y, z)

Set the new size for this Bone.
Parameters:
x - The new x value.
           (type=float)
y - The new y value.
           (type=float)
z - The new z value.
           (type=float)

setTail(x, y, z)

Set the "tail" ending position.
Parameters:
x - The new x value.
           (type=float)
y - The new y value.
           (type=float)
z - The new z value.
           (type=float)

setWeight(weight)

Set the bones's weight.
Parameters:
weight - set the the bone's weight.
           (type=float)

unhide()

Unhide this bone.

Class Variable Details

children

The children bones.

head

This Bone's "head" ending position when in rest state.

loc

This Bone's location.

name

The name of this Bone.

parent

The parent Bone.

quat

This Bone's quaternion.

roll

This Bone's roll value.

size

This Bone's size.

tail

This Bone's "tail" ending position when in rest state.

weight

The bone's weight.

Generated by Epydoc 2.0 on Wed May 12 22:11:01 2004 http://epydoc.sf.net