I write an exporter to retrieve the pose bone matrix for every frame.
The concept looks like this, the code is called from an exporter class via an operation button in the tool shelf:
for action in actions:
for frame in range(action.frame_range[1]):
bpy.context.scene.frame_set(frame)
context.scene.update()
for poseBone in armature.pose.bones:
exportMatrix = poseBone.matrix
However, the exported poseBone.matrix values all have the same values from one frame. I checked in the pyhton console if the values change when i manually change the current frame and they do.
What am I missing to update the pose bone matrix after a frame change?