Module NLA
The Blender.Armature.NLA submodule.
NLA
This module provides access to Action objects in Blender.
Actions are a series of keyframes/Ipo curves that define the movement
of a bone. Actions are linked to objects of type armature.
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)
armData.addBone(bn1)
armData.addBone(bn2)
armObj.link(armData)
scn = Blender.Scene.getCurrent()
scn.link(armObj)
armObj.makeDisplayList()
Blender.Window.RedrawAll()
action = Blender.Armature.NLA.NewAction()
action.setActive(armObj)
bn2.setPose([ROT,LOC,SIZE])
context = scn.getRenderingContext()
context.currentFrame(2)
quat = Blender.Mathutils.Quaternion([1,2,3,4])
bn2.setQuat(quat)
bn2.setLoc([3,4,5])
bn2.setPose([ROT,LOC,SIZE])
print action.name
action2 = Blender.Armature.NLA.CopyAction(action)
action2.name = "Copy"
Classes |
Action |
This object gives access to Action-specific data in Blender. |
Function Summary |
PyAction
|
CopyAction (action)
Copy an action and it's keyframes |
PyList of PyActions
|
GetActions ()
Get all actions and return them as a list. |
PyAction
|
NewAction (name)
Create a new Action object. |
CopyAction(action)
Copy an action and it's keyframes
-
- Parameters:
action -
The action to be copied.
(type=PyAction)
- Returns:
-
A copied action
(type=PyAction)
|
GetActions()
Get all actions and return them as a list.
-
- Returns:
-
All the actions in blender
(type=PyList of PyActions)
|
NewAction(name='DefaultAction')
Create a new Action object.
-
- Parameters:
name -
The Action name.
(type=string)
- Returns:
-
PyAction
|