A skeleton has an "update cache", which is an ordered list of bones and constraints that need to be "updated" when Skeleton updateWorldTransform
is called, which is to say bone world transforms are computed and the constraints are applied to manipulate their constrained bones. The contents of the update cache is computed once when the skin changes. After that, only the bones and constraints in the update cache are computed by updateWorldTransform
.
Bones and constraints that are in at least one skin are not included in the update cache (they are "inactive") unless a skin containing them is the current skin. This means having many bones and/or constraints that are inactive does not affect performance at all. However, there is still a small difference with animation timelines. Inactive bones and constraints may have timelines, so each timeline has to first check if the bone or constraint is inactive and if so, do nothing. This check is quite cheap, especially compared to how it used to work: previously all bones were always active, so all timelines were always applied, even for bones that were not needed for the current skin. Should this be a performance problem (which is unlikely unless you have thousands or more timelines in a single animation), optimizations could be done. Eg, there could be an update cache similar to what the skeleton does that collects only the timelines that need to be applied, so the inactive timelines don't need to be checked.
You may think great, now I can put all my characters in a single skeleton! Yes, yes you could, but that might not be the best idea for organization and means that you cannot split up loading skeleton data for only some of your characters.
The skin bones and constraints feature has many uses, but the most common is to use a skin per in-game item and to have bones only for that item. Eg, maybe your skeleton can equip a machine gun which uses bones to make spent shell casing fly out of the gun. There are other uses too, such as using constraints in a skin to move bones only for that skin, allowing you to change the proportions of your skeleton for a skin and reuse all your rigging and animations.