Hi all,
I’m still stuck on getting the translation / rotation of meshes animated through an armature (meshes are parented to armature, so there is no mesh deformation).
After doing a lot of research in forums and discussion in #blender I managed to get the armature animated while the script is running. This ex. shows how:
import Blender
currentFrame = 1
Blender.Set('curframe',currentFrame)
while currentFrame < 50
Blender.Window.RedrawAll()
objname = Blender.Object.getSelected()[0].name
msh = Blender.NMesh.GetRawFromObject(objname)
print msh.verts[0].co
currentFrame += 1
Blender.Set('curframe',currentFrame)
The problem is, that print ver.co always prints the same position though I can see the object (mesh) move in the 3d window while the script runs through.
This is what I have tried:
- object.getMatrix(): Matrix doesn’t get updated
- object.getEuler() and getLocation(): don’t get updated
- Blender.NMesh.GetRawFromObject(objname): not updated
- Blender.NMesh.GetRaw(objname): not updated
So I think I’m doing something wrong… missing some update, refresh or whatever comman…
Suggestions welcome
Regards,
Christoph