Gltf , skeleton , overrideMesh

I was using “Skeleton.overrideMesh” to check if a skeleton had animation groups.
I upgraded from 5.0.0-beta.7 to 5.0.0-rc.11 and I see that, that property has been removed.
Any reason why? and what can I use instead of that now?

cc @bghgary who did the change.

@bghgary has been amazing at removing it as before a skeleton was limited to one mesh and plenty of other rather “naughty” subtilties resulting in application bugs.

now you would probably need smthg like this I guess:

skeleton.animations.any((sa) => scene.animationGroups.any(g  => g.children.any(a => s.animations.indexOf(sa)));

Thanks @sebavan I will give that a try.

Not familiar with “any”. Did you mean “some”?
Also “g.children” would return “TargetedAnimation” and that doesn’t have “animations” but instead has “animation”. Right?
So did you mean something like

skeleton.animations.some(sa => scene.animationGroups.some(g  => g.children.any(ta => ta.animation==sa)));


1 Like

I believe that is correct. Checking overrideMesh isn’t a reliable way to see if the skeleton is part of an animation group. I’m curious why you need to know this?

yup I meant some :slight_smile: this was just to give the overall idea :slight_smile:

I am using this for my character controller
when a character mesh is passed to it it tries to figure out the animations to use
3 uses cases
rigged mesh with animation ranges
rigged mesh with animation groups
un rigged mesh with animation groups

1 Like

Hello @satguru just checking in, was your question answered?

yes it was