godotengine / godot-blender-exporter

Addon for Blender to directly export to a Godot Scene
GNU General Public License v2.0
1.15k stars 132 forks source link

Object parented to bone exported with incorrect transforms #123

Open twilson90 opened 5 years ago

twilson90 commented 5 years ago

I have a skeleton, a body mesh and a head mesh. The head is parented to the head bone in the rig, in blender it has a position of x=0, y=0, z=1.5. The godot exporter creates a boneattachment node in the position of the head object (z=1.5), and the head mesh is parented to this node. However, the local position of the head mesh is still z=1.5, when the transform should be identity. And the boneattachment for some reason has a rotation of x=90°, so not only is my guy's head detached from his body, but it's looking directly at the floor. I've attached below the character blend file and the exported escn.

godot windows opt tools 64 mono_2018-12-05_17-30-06

character.zip

kone9 commented 5 years ago

Layers that when exporting it are not the connections. In the old plugin it was necessary to evacuate "EXCLUDE CTROL BONE", since otherwise the related bones that were not united stopped working

Google translator

Jason0214 commented 5 years ago

It is caused by a pose bone option Relative Parenting of bone head

screen shot 2018-12-05 at 20 26 43 screen shot 2018-12-05 at 20 26 55

When disable it, the object transform is same as what we get in godot.

It is also the first time I get to know this option 😅, still checking if it can be automatically handled by the exporter

Jason0214 commented 5 years ago

Looks like it is not very trivial to support this 'Relative Parent' option. As this option seems not very frequently used among artists, I will not make it a very high priority issue to fix. Sorry about that