I'm very new to Blender, so please forgive my incompetence. II need to control an armature using Python so that I can animate a biped model using data from a text file. I've been using this tutorial and some other sources to try and do so, but I can never see any results in the rendered game window.
The code I have thus far is:
import GameLogic
arm = GameLogic.getCurrentController().owner
print(arm.channels['Upperleg.L'].rotation_euler)
arm.channels['Upperleg.L'].rotation_euler = [5, 5, 5]
arm.update()
print(arm.channels['Upperleg.L'].rotation_euler)
In the console, the values for BL_ArmatureChannel.rotation_euler
are changing...
<Vector <0.0000, 0.0000, 0.0000>>
<Vector <5.0000, 5.0000, 5.0000>>
...but nothing is happening with the model linked to the armature (not visually at least). If I change BL_ArmatureChannel.rotation_euler
to BL_ArmatureChannel.joint_rotation
the values being printed in the console don't change at all.
On my armature, I have an "Always" sensor attached to a "Python" controller to execute the script. There are no IK constraints on the armature and no other sensors/controllers/actuators.
Any help on this matter would be greatly appreciated, my research sponsor is breathing down my neck to get. I have a tight deadline on this project done and I can't seem to get this very simple (but necessary) part of it working.