It used to be simple to preview bones with SkeletonViewer in v4.1.0. I could supply a simple box mesh without any weights set to the SkeletonViewer constructor. But my old code does not work anymore.
I figured v4.2.0 requires bone weights for each vertex so I tried that but struggle get the viewer to work. No bones are shown.
What has changed? Why do we even need a mesh to preview bones? Graphics card issue?
but this change did break backward compatibility, Ill try to fix that today so at least your line render will work without an attached mesh for now.
Ill have to take a look at the spear and spurs mode and can prolly make that work as well without it, but the skeleton will always appear at origin if its not attached to a mesh.
Give me a second, I am doing pushes to the Viewer today and I think I see whats going wrong.
Sorry for the crossed wires, well get you back on track! @reimund
Well, it makes sense to me to only display bones used by the mesh as a skeleton viewer is created by providing a support mesh (that was already the case in 4.1).
Say for eg. you have N different meshes and each one uses a different part of a single skeleton: you don’t want to draw the full skeleton N times, you want to draw only the bones pertaining to each of the mesh. After you have drawn all N meshes, the full skeleton (meaning all the bones of the skeleton) will have been draw a single time instead of N.
Now I understand your need, maybe we can add an option to always display the full skeleton no matter what and make it true by default, to avoid a breaking change: @Deltakosh what do you think?
I can report the same issue for 4.2. In my case, I have multiple meshes with also top, pants, hair, & shoes, and have my reasons for not merging. I am only working on the hands right now, but when I want add dancing while playing (also the reason I am switching to IK posing, & absolutely required for drumming) I will have to merge in dev.
In a situation like this you will have to do multiple viewers I originally had it so a mesh was not required, but that makes it so the skeleton technically has no transform Matrix then.
I think for comparability reasons you will nee to make multiple viewers in a situation like this.
I would just merge in Blender, export, and not save the .blend file. Later re-export the way I really want. This worked fine in 4.1, but am adding 4.2 stuff in other places, so will break at some point going that way.