[write_rig.py] Fix bones order & Fix inconsistent order of json values#311
[write_rig.py] Fix bones order & Fix inconsistent order of json values#311glekDev wants to merge 1 commit intoWolvenKit:mainfrom
Conversation
Calculate depth based on names from the original json. Btw im not sure if this script is even supposed to work..
|
Howdy! Thanks for the PR
It's not really at this point - there are a few reasons why which I'll try to touch on below as well as my thoughts on the easiest ways to fix it - if you have the time and motivation to do some more work on this, it would definitely be appreciated by everyone!
LS = Local Space In general, aPoseLS is the array that actually gets used. If both aPoseLS and boneTransforms(which is essentially tPoseLS) are present, aPoseLS will override boneTransforms - aPoseMS gets recalculated at runtime, but in blender is a lot less effort to use than the other options when it's present Sometimes transforms are being applied in LS on some bones and MS on others, makes for lots of fun :D
What the meshes have is not really rig data - this is the skinning data that defines the relationship between the vertex groups in the mesh and the joints of the rig
Kind of explained above, unless you're about to try to build a dangle rig, I'd recommend focusing on understanding the rest of the info before getting too down that rabbit hole - they're all different pieces of information
A couple reasons:
Now for my thoughts on fixing rig export:
This is a lot of information to throw in a github comment and there is a lot more to share that I won't ramble on about here, but feel free to ping me on discord if you have any questions on the above - more than happy to help! |



Calculate depth based on names from the original json and fix inconsistent order of json values.
Also jsons from wolvenkit have uppercase exponent indicator "E-", while python outputs them lowercase "e-" (it doesnt affect anything, just makes diffing harder)
Btw im not sure if this script is even supposed to work..
Just exporting .rig from wolvenkit to blender and back to wolvenkit (without any changes) does this: