manipulating bones via python

I’m trying to create a simple utility to store bone positions (poses) to file so the static poses can be reapplied later to build up an animation. The same idea as RVK’s but for bones instead of meshes.

However, I can’t get bone transformations to show up in the viewport. here’s the very simple test code to see if the concept is doable.

Thanks!

Dave

###############################################################

poser script

to create a way to store poses, and later add sliders

import Blender
from Blender import *

theres a skeleton rig called “human”

arm = Armature.Get (“human”)
bones = arm.getBones()

tail is the main rig control bone, so I want to see what happens if I move it around via python

tail = bones[0]

tail.setRoll(0) # this works! The bone rotates on it’s Y axis

however the following all seem to have no affect whatever

if I tell Blender to print the values, they print right but nothing happens in the

viewport

tail.setLoc(2.0,2.0,2.0)
tail.setSize(2,2,2)

…etc.

if I check the values and print them…

loc = tail.getLoc()
print loc

the modified values are printed in the console!

but no change in the viewport or in the numerical transform pop-up

Window.RedrawAll()

has no effect

btw…

making adjustments to head and tail position works but you have to toggle in

and out of edit mode to refresh the view. This affects the bones’

rest position, which is NOT what we want, we want to affect the bones in

posemode

##################################################################

Seting/geting poses/actions etc. is currently being worked on and may or may not show in this next release.