Module Bone
[frames | no frames]

Module Bone

The Blender.Armature.Bone submodule.

Bone

This module provides access to Bone objects in Blender. Bones are used to create armatures.

Example:
 import Blender
 from Blender import *
 from Blender.Armature import *
 from Blender.Armature.Bone import *

 armObj = Object.New('Armature', "Armature_obj")
 armData = Armature.New()

 bn1=Blender.Armature.Bone.New("bone1")
 bn1.setHead(0.0,0.0,0.0)
 bn1.setTail(2.0,1.0,0.0)

 bn2=Blender.Armature.Bone.New("bone2")
 bn2.setHead(3.0,2.0,1.0)
 bn2.setTail(4.0,4.0,1.0)
 bn2.setRoll(.5)
 bn2.setParent(bn1)

 bn3=Blender.Armature.Bone.New("bone3")
 bn3.setHead(5.0,6.0,2.0)
 bn3.setTail(5.0,8.0,2.0)
 bn3.setParent(bn2)

 armData.addBone(bn1)
 armData.addBone(bn2)
 armData.addBone(bn3)

 armData.drawAxes(1)
 armObj.link(armData)

 scn = Blender.Scene.getCurrent()
 scn.link(armObj)

 armObj.makeDisplayList()
 Blender.Window.RedrawAll()

 bn2.setPose([ROT,LOC,SIZE])  

Classes
Bone This object gives access to Bone-specific data in Blender.

Variable Summary
  BoneclassFlags: The available flags for setting boneclass.
  PoseFlags: The available flags for setting keyframed poses.

Variable Details

BoneclassFlags

The available flags for setting boneclass.
  • SKINNABLE
  • UNSKINNABLE
  • HEAD
  • NECK
  • BACK
  • SHOULDER
  • ARM
  • HAND
  • FINGER
  • THUMB
  • PELVIS
  • LEG
  • FOOT
  • TOE
  • TENTACLE

PoseFlags

The available flags for setting keyframed poses.
  • ROT - add bone's rotation to keyframe
  • LOC - add bone's location to keyframe
  • SIZE- add bone's size to keyframe

Generated by Epydoc 2.1 on Thu Aug 12 21:47:30 2004 http://epydoc.sf.net