First encountered this back in 5.2 and fixed it by changing UPoseableMeshComponent::AllocateTransformData() to start with this code. We had modified Mutable code at the time support PoseableMeshComponents, and found the poses were being lost when a pose asset’s Mesh was refreshed by Mutable, as it temporarily cleared the SkinnedAsset. Looking at the code in 5.6, I’d assume this could still be an issue and there might be other contexts where the a poseablemeshcomponent might have its mesh temporarily cleared.
if (GetSkinnedAsset() == nullptr) { return false; }
Hi, I take it that it’s specifically the call to BoneSpaceTransforms.Empty() that’s causes the problem?
We can probably just remove that line since it only gets called when the mesh asset is null anyway. Otherwise, Super::AllocateTransformData will return true, and we don’t take the code path that clears those transforms.
The concern with the specific change that you mentioned is that if we early-out when the skinned asset is null, we won’t clear ComponentSpaceTransformsArray and PreviousComponentSpaceTransformsArray via Super::AllocateTransformData, which would be a larger behaviour change.
Yeah, I think it likely is the BoneSpaceTransforms.Empty() that is the problem.
Ok, I’ll get that change made