1

I'm trying to get the absolute position of a pose bone. To do that, I'm just doing poseBone.matrix.translation. That works fine except for a case. If you rotate the bone's parent, the bone's position will change. The system I must use doesn't accept that, so I decided to do this instead:

globalPos = poseBone.bone.head_local + poseBone.location * Matrix((poseBone.x_axis, 
                                                                   poseBone.y_axis, 
                                                                   poseBone.z_axis))

That works fine but there's one problem with it. When you scale the bone's parent, the bone's position also changes. I need get taht position change in the globalPos too, which before woekred fine. But with the no-translation-from-parent-rotation way I don't get the scaling translation. I suppose that, to get it, I must do:

globalPos *= poseBone.matrix.to_scale()

That, however, doesn't work quite as I expected. So I was wondering, is there any simpler way to do this? (either apply translation from parent's scaling or substracting translation from parent's rotation).

Thanks in advance.

eric.m
  • 227
  • 1
  • 7

0 Answers0