UuuNyaa / blender_mmd_tools

MMD Tools is a blender addon for importing/exporting Models and Motions of MikuMikuDance.
GNU General Public License v3.0
1.94k stars 92 forks source link

Disconnect All hidden bones? #100

Closed xzhuah closed 10 months ago

xzhuah commented 1 year ago

The "Link to" logic in PMX and MMD is different.

For PMX model, when a bone A is "link to" another bone B, it only has visual effect: you will see a triangle link from A to B. It won't affect the actual movement of bone A and B.

However in blender, when you link two Bones by connecting them, the connection will make sure these two bone are always phsically connected.

Usually it won't be a problem because for most bones, if they are linked, they are physically connected. But I recently see some models who is using a lot of hidden bones for controling expression. Some of the bones are connected, the expression is correct in MMD/PMXEditor, but not looking good in blender because some bones are not moving correctly because they are connected to other bones. This issue can be resolved by manually find these bones and press alt+p in edit mode and disconnect them.

Here is an example model:

https://drive.google.com/file/d/15U21mm5EIFvZTl_41A0jq44RO3TDRq1H/view?usp=sharing

The bone morph "でも、・・・" is not working correctly in Blender but looks good in PMXEditor

The reason is the hidden bone "mouth_S_1" is connected(linked) to the "mouth" bone. You can fix this by disconnect it in edit mode in Blender. N1WMJR$){7YSVE16{E{ATPV

`9QG02CG{W XUCF@$1JN@HR_tmb.

I wonder if it make sense to not connecting any bones when importing PMX models, or at least not connecting for hidden bones?

UuuNyaa commented 11 months ago

Thank you for the report! 😀 I was surprised that such a critical bug remained in the old and supposedly well-tested code.

I fixed the bug with bc02663b2c868847291ed313da743b4863930c9b .

https://github.com/UuuNyaa/blender_mmd_tools/assets/70152495/b85e46a7-1b9b-4bc5-8ee7-c8f69f408a86

I will release a test version and would be happy to get your feedback.

UuuNyaa commented 11 months ago

Pre-release: https://github.com/UuuNyaa/blender_mmd_tools/releases/tag/v2.9.0

@xzhuah Please test it and give feedback.

UuuNyaa commented 11 months ago

@xzhuah v2.9.0 has a bug, so I have released v2.9.1. Please test with the new one. https://github.com/UuuNyaa/blender_mmd_tools/releases

xzhuah commented 10 months ago

Thank you @UuuNyaa , I have tested with v2.9.1 and it works perfectly!