1
$\begingroup$

I tried to find out what armature.bones.head and -.head_local stand for. So I first get the values of them first from upperArm.R

C.object.data.bones['upperArm.R'].head Vector((-0.14598365128040314, -0.014478057622909546, -0.002403122605755925))

C.object.data.bones['upperArm.R'].head_local Vector((-0.1459999978542328, 0.0010000000474974513, 0.43689292669296265))

I open the property panel, the head position is -0.146,0.001,0.437 which is the same as the head_local.

All right. But when I click the Z property, the infor window showed that bpy.context.object.data.head[2] = 0.437

So who tell the truth? 0.437 comes from head or head_local. Two part show two different answers. Can anyone help in this?

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

You'll notice that the property window only shows three decimals of precision.

If you round 0.43689292669296265 to three decimal places, you get 0.437. They're both accurate, but one is more precise than the other. If I were you, I'd choose the one that's more precise. Note that you can put the very long number into the field in the property window, but it'll get rounded.

In short, always choose the referenced value, not the displayed value. The interface is getting a number from somewhere, and then formatting it for display to the user. Instead of using a value that's being modified to fit nicely in a field, you should reference the same value that the interface is referencing.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .