Guest User

Untitled

a guest
Nov 19th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. rest position:
  2. head (0,0,0)
  3. tail (0,0,1)
  4. roll 0
  5.  
  6. pose:
  7. rotation_euler (0,0,-pi/2) # With respect to rest position, this is actually (0,pi/2,0)
  8. position (0,0,10) # With respect to rest position, is actually (0,10,0)
  9.  
  10. # Same bone with head(0,0,0),tail(0,0,1),roll(0),euler_rotation(0,0,-pi/2)
  11. globalQ = pose_bone.matrix.to_quaternion().copy()
  12. parentQ = pose_bone.bone.matrix.to_quaternion().copy()
  13. diff = globalQ.rotation_difference(parentQ) # becomes euler (0,0,pi/2)
Add Comment
Please, Sign In to add comment